diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-02-11 13:03:24 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-02-11 13:03:24 +0100 |
commit | ed0d135247790f67ead7f1a8c21a020790e80a74 (patch) | |
tree | d904008b340bd975c3a80b6cfd4ecfb1a738f4c9 /src | |
parent | dd068928c1c39854a65108366c1a3106cfdb43c5 (diff) | |
parent | a6136e8b0be70efb42801267d11a9e5edca5e377 (diff) | |
download | rneovim-ed0d135247790f67ead7f1a8c21a020790e80a74.tar.gz rneovim-ed0d135247790f67ead7f1a8c21a020790e80a74.tar.bz2 rneovim-ed0d135247790f67ead7f1a8c21a020790e80a74.zip |
Merge #7939 "fix crash: 'spell' and long lines"
closes #7937
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/screen.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 8a29734025..22cdcc3bef 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -3360,10 +3360,11 @@ win_line ( /* Use nextline[] if possible, it has the start of the * next line concatenated. */ - if ((prev_ptr - line) - nextlinecol >= 0) - p = nextline + (prev_ptr - line) - nextlinecol; - else + if ((prev_ptr - line) - nextlinecol >= 0) { + p = nextline + ((prev_ptr - line) - nextlinecol); + } else { p = prev_ptr; + } cap_col -= (int)(prev_ptr - line); size_t tmplen = spell_check(wp, p, &spell_hlf, &cap_col, nochange); assert(tmplen <= INT_MAX); |