Mercurial > vim
changeset 13375:33f514c94943 v8.0.1561
patch 8.0.1561: crash with rust syntax highligting
commit https://github.com/vim/vim/commit/069dafc1ded60d9ee0fee4bcecce78ac8a235d87
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 3 20:02:19 2018 +0100
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 03 Mar 2018 20:15:06 +0100 |
parents | 9986f28dc657 |
children | d8072d996245 |
files | src/syntax.c src/version.c |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/syntax.c +++ b/src/syntax.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;