Permalink
Browse files

patch 8.0.1561: crash with rust syntax highligting

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 069dafc1ded60d9ee0fee4bcecce78ac8a235d87
Showing with 4 additions and 1 deletion.
  1. +2 −1 src/syntax.c
  2. +2 −0 src/version.c
@@ -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;
@@ -778,6 +778,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1561,
/**/
1560,
/**/

0 comments on commit 069dafc

Please sign in to comment.