Skip to content

Commit

Permalink
patch 8.0.1561: crash with rust syntax highligting
Browse files Browse the repository at this point in the history
Problem:    Crash with rust syntax highligting. (Edd Barrett)
Solution:   Avoid going past the end of an empty line.
  • Loading branch information
brammool committed Mar 3, 2018
1 parent 3767b61 commit 069dafc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/syntax.c
Original file line number Diff line number Diff line change
Expand Up @@ -2470,7 +2470,8 @@ syn_current_attr(

/* nextgroup ends at end of line, unless "skipnl" or "skipempty" present */
if (current_next_list != NULL
&& syn_getcurline()[current_col + 1] == NUL
&& (line = syn_getcurline())[current_col] != NUL
&& line[current_col + 1] == NUL
&& !(current_next_flags & (HL_SKIPNL | HL_SKIPEMPTY)))
current_next_list = NULL;

Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1561,
/**/
1560,
/**/
Expand Down

0 comments on commit 069dafc

Please sign in to comment.