mirror of
https://github.com/neovim/neovim.git
synced 2025-09-10 05:18:16 +00: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:

committed by
Justin M. Keyes

parent
9f994bb699
commit
c21cf6d3cc
@@ -2133,9 +2133,11 @@ syn_current_attr (
|
|||||||
|
|
||||||
/* nextgroup ends at end of line, unless "skipnl" or "skipempty" present */
|
/* nextgroup ends at end of line, unless "skipnl" or "skipempty" present */
|
||||||
if (current_next_list != NULL
|
if (current_next_list != NULL
|
||||||
&& syn_getcurline()[current_col + 1] == NUL
|
&& (line = syn_getcurline())[current_col] != NUL
|
||||||
&& !(current_next_flags & (HL_SKIPNL | HL_SKIPEMPTY)))
|
&& line[current_col + 1] == NUL
|
||||||
|
&& !(current_next_flags & (HL_SKIPNL | HL_SKIPEMPTY))) {
|
||||||
current_next_list = NULL;
|
current_next_list = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!GA_EMPTY(&zero_width_next_ga))
|
if (!GA_EMPTY(&zero_width_next_ga))
|
||||||
ga_clear(&zero_width_next_ga);
|
ga_clear(&zero_width_next_ga);
|
||||||
|
Reference in New Issue
Block a user