Skip to content

Commit 6773a34

Browse files
committed
patch 7.4.1141
Problem: Using searchpair() with a skip expression that uses syntax highlighting sometimes doesn't work. (David Fishburn) Solution: Reset next_match_idx. (Christian Brabandt)
1 parent e266d6d commit 6773a34

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/syntax.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6474,6 +6474,12 @@ syn_get_id(wp, lnum, col, trans, spellp, keep_state)
64746474
|| lnum != current_lnum
64756475
|| col < current_col)
64766476
syntax_start(wp, lnum);
6477+
else if (wp->w_buffer == syn_buf
6478+
&& lnum == current_lnum
6479+
&& col > current_col)
6480+
/* next_match may not be correct when moving around, e.g. with the
6481+
* "skip" expression in searchpair() */
6482+
next_match_idx = -1;
64776483

64786484
(void)get_syntax_attr(col, spellp, keep_state);
64796485

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ static char *(features[]) =
741741

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
1141,
744746
/**/
745747
1140,
746748
/**/

0 commit comments

Comments
 (0)