0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

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.
This commit is contained in:
Bram Moolenaar 2018-03-03 20:02:19 +01:00
parent 3767b61ad9
commit 069dafc1de
2 changed files with 4 additions and 1 deletions

View File

@ -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;

View File

@ -778,6 +778,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1561,
/**/
1560,
/**/