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)
diff --git a/src/testdir/test_spell.vim b/src/testdir/test_spell.vim
index 9cbfaa5..146e421 100644
--- a/src/testdir/test_spell.vim
+++ b/src/testdir/test_spell.vim
@@ -4,6 +4,8 @@
source check.vim
CheckFeature spell
+source screendump.vim
+
func TearDown()
set nospell
call delete('Xtest.aff')
@@ -460,6 +462,29 @@
bwipe!
endfunc
+func Test_spell_screendump()
+ CheckScreendump
+
+ let lines =<< trim END
+ call setline(1, [
+ \ "This is some text without any spell errors. Everything",
+ \ "should just be black, nothing wrong here.",
+ \ "",
+ \ "This line has a sepll error. and missing caps.",
+ \ "And and this is the the duplication.",
+ \ "with missing caps here.",
+ \ ])
+ set spell spelllang=en_nz
+ END
+ call writefile(lines, 'XtestSpell')
+ let buf = RunVimInTerminal('-S XtestSpell', {'rows': 8})
+ call VerifyScreenDump(buf, 'Test_spell_1', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('XtestSpell')
+endfunc
+
let g:test_data_aff1 = [
\"SET ISO8859-1",
\"TRY esianrtolcdugmphbyfvkwjkqxz-\xEB\xE9\xE8\xEA\xEF\xEE\xE4\xE0\xE2\xF6\xFC\xFB'ESIANRTOLCDUGMPHBYFVKWJKQXZ",