1
0
forked from aniani/vim

patch 8.1.2172: spell highlight is wrong at start of the line

Problem:    Spell highlight is wrong at start of the line.
Solution:   Fix setting the "v" variable. (closes #5078)
This commit is contained in:
Bram Moolenaar
2019-10-18 20:37:08 +02:00
parent a1cb1d1dce
commit 7751d1d1a3
4 changed files with 38 additions and 1 deletions

View File

@@ -1824,6 +1824,7 @@ win_line(
// Only do this when there is no syntax highlighting, the
// @Spell cluster is not used or the current syntax item
// contains the @Spell cluster.
v = (long)(ptr - line);
if (has_spell && v >= word_end && v > cur_checked_col)
{
spell_attr = 0;
@@ -1874,7 +1875,8 @@ win_line(
// Remember that the good word continues at the
// start of the next line.
checked_lnum = lnum + 1;
checked_col = (int)((p - nextline) + len - nextline_idx);
checked_col = (int)((p - nextline)
+ len - nextline_idx);
}
// Turn index into actual attributes.