patch 9.0.0175: spell checking for capital not working with trailing space
Problem: Spell checking for capital not working with trailing space.
Solution: Do not calculate cap_col at the end of the line. (Christian
Brabandt, closes #10870, issue #10838)
diff --git a/src/testdir/test_spell.vim b/src/testdir/test_spell.vim
index 94ea3d7..3ea9aff 100644
--- a/src/testdir/test_spell.vim
+++ b/src/testdir/test_spell.vim
@@ -965,6 +965,29 @@
call delete('XtestSpell')
endfunc
+func Test_spell_screendump_spellcap()
+ CheckScreendump
+
+ let lines =<< trim END
+ call setline(1, [
+ \ " This line has a sepll error. and missing caps and trailing spaces. ",
+ \ "another missing cap here.",
+ \ "",
+ \ "and here.",
+ \ " ",
+ \ "and here."
+ \ ])
+ set spell spelllang=en
+ END
+ call writefile(lines, 'XtestSpellCap')
+ let buf = RunVimInTerminal('-S XtestSpellCap', {'rows': 8})
+ call VerifyScreenDump(buf, 'Test_spell_2', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('XtestSpellCap')
+endfunc
+
let g:test_data_aff1 = [
\"SET ISO8859-1",
\"TRY esianrtolcdugmphbyfvkwjkqxz-\xEB\xE9\xE8\xEA\xEF\xEE\xE4\xE0\xE2\xF6\xFC\xFB'ESIANRTOLCDUGMPHBYFVKWJKQXZ",