diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-03-03 20:02:19 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-03-03 20:02:19 +0100 |
commit | 069dafc1ded60d9ee0fee4bcecce78ac8a235d87 (patch) | |
tree | bf218ed98ca113eb8d3c818c3107e44b4089b7b7 /src/syntax.c | |
parent | 3767b61ad99fe6ff2cace2dccb5d35331786735f (diff) | |
download | vim-git-069dafc1ded60d9ee0fee4bcecce78ac8a235d87.tar.gz |
patch 8.0.1561: crash with rust syntax highligtingv8.0.1561
Problem: Crash with rust syntax highligting. (Edd Barrett)
Solution: Avoid going past the end of an empty line.
Diffstat (limited to 'src/syntax.c')
-rw-r--r-- | src/syntax.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/syntax.c b/src/syntax.c index 81f460470..d0d4515e0 100644 --- 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; |