screen.c: resolve neovim issue #7937

This commit is contained in:
Michael Brailsford
2018-01-30 13:05:59 -06:00
parent 2a4c9c6e45
commit a6136e8b0b
2 changed files with 49 additions and 3 deletions

View File

@@ -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);