mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #4402 from jbradaric/vim-7.4.1141
vim-patch:7.4.1141
This commit is contained in:
commit
c3b6cd300f
@ -5533,25 +5533,29 @@ char_u *get_syntax_name(expand_T *xp, int idx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
// Function called for expression evaluation: get syntax ID at file position.
|
||||||
* Function called for expression evaluation: get syntax ID at file position.
|
int syn_get_id(
|
||||||
*/
|
|
||||||
int
|
|
||||||
syn_get_id (
|
|
||||||
win_T *wp,
|
win_T *wp,
|
||||||
long lnum,
|
long lnum,
|
||||||
colnr_T col,
|
colnr_T col,
|
||||||
int trans, /* remove transparency */
|
int trans, // remove transparency
|
||||||
bool *spellp, /* return: can do spell checking */
|
bool *spellp, // return: can do spell checking
|
||||||
int keep_state /* keep state of char at "col" */
|
int keep_state // keep state of char at "col"
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
/* When the position is not after the current position and in the same
|
// When the position is not after the current position and in the same
|
||||||
* line of the same buffer, need to restart parsing. */
|
// line of the same buffer, need to restart parsing.
|
||||||
if (wp->w_buffer != syn_buf
|
if (wp->w_buffer != syn_buf
|
||||||
|| lnum != current_lnum
|
|| lnum != current_lnum
|
||||||
|| col < current_col)
|
|| col < current_col) {
|
||||||
syntax_start(wp, lnum);
|
syntax_start(wp, lnum);
|
||||||
|
} else if (wp->w_buffer == syn_buf
|
||||||
|
&& lnum == current_lnum
|
||||||
|
&& col > current_col) {
|
||||||
|
// next_match may not be correct when moving around, e.g. with the
|
||||||
|
// "skip" expression in searchpair()
|
||||||
|
next_match_idx = -1;
|
||||||
|
}
|
||||||
|
|
||||||
(void)get_syntax_attr(col, spellp, keep_state);
|
(void)get_syntax_attr(col, spellp, keep_state);
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ static int included_patches[] = {
|
|||||||
// 1144 NA
|
// 1144 NA
|
||||||
// 1143,
|
// 1143,
|
||||||
// 1142,
|
// 1142,
|
||||||
// 1141,
|
1141,
|
||||||
// 1140,
|
// 1140,
|
||||||
// 1139 NA
|
// 1139 NA
|
||||||
// 1138 NA
|
// 1138 NA
|
||||||
|
Loading…
Reference in New Issue
Block a user