mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.0.1561: crash with rust syntax highligting (#8095)
Problem: Crash with rust syntax highligting. (Edd Barrett)
Solution: Avoid going past the end of an empty line.
069dafc1de
Closes #6248
This commit is contained in:
parent
9f994bb699
commit
c21cf6d3cc
@ -2133,9 +2133,11 @@ 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
|
||||
&& !(current_next_flags & (HL_SKIPNL | HL_SKIPEMPTY)))
|
||||
&& (line = syn_getcurline())[current_col] != NUL
|
||||
&& line[current_col + 1] == NUL
|
||||
&& !(current_next_flags & (HL_SKIPNL | HL_SKIPEMPTY))) {
|
||||
current_next_list = NULL;
|
||||
}
|
||||
|
||||
if (!GA_EMPTY(&zero_width_next_ga))
|
||||
ga_clear(&zero_width_next_ga);
|
||||
|
Loading…
Reference in New Issue
Block a user