diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-10-05 13:29:15 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-10-05 13:29:15 +0100 |
commit | f3ef026c9897f1d2e3fba47166a4771d507dae91 (patch) | |
tree | f46f289180fb90f5c2b51479bf3f39bb9e669813 /src/testdir/test_spell.vim | |
parent | d1955987147a299d7bca30cd1b5792535ff0745c (diff) |
patch 9.0.0664: bad redrawing with spell checking, using "C" and "$" in 'cpo'v9.0.0664
Problem: Bad redrawing with spell checking, using "C" and "$" in 'cpo'.
Solution: Do not redraw the next line when "$" is in 'cpo'. (closes #11285)
Diffstat (limited to 'src/testdir/test_spell.vim')
-rw-r--r-- | src/testdir/test_spell.vim | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/src/testdir/test_spell.vim b/src/testdir/test_spell.vim index 97c7e3cc28..3f77695c23 100644 --- a/src/testdir/test_spell.vim +++ b/src/testdir/test_spell.vim @@ -956,13 +956,12 @@ func Test_spell_screendump() \ ]) set spell spelllang=en_nz END - call writefile(lines, 'XtestSpell') + call writefile(lines, 'XtestSpell', 'D') let buf = RunVimInTerminal('-S XtestSpell', {'rows': 8}) call VerifyScreenDump(buf, 'Test_spell_1', {}) " clean up call StopVimInTerminal(buf) - call delete('XtestSpell') endfunc func Test_spell_screendump_spellcap() @@ -979,7 +978,7 @@ func Test_spell_screendump_spellcap() \ ]) set spell spelllang=en END - call writefile(lines, 'XtestSpellCap') + call writefile(lines, 'XtestSpellCap', 'D') let buf = RunVimInTerminal('-S XtestSpellCap', {'rows': 8}) call VerifyScreenDump(buf, 'Test_spell_2', {}) @@ -997,7 +996,30 @@ func Test_spell_screendump_spellcap() " clean up call StopVimInTerminal(buf) - call delete('XtestSpellCap') +endfunc + +func Test_spell_compatible() + CheckScreendump + + let lines =<< trim END + call setline(1, [ + \ "test "->repeat(20), + \ "", + \ "end", + \ ]) + set spell cpo+=$ + END + call writefile(lines, 'XtestSpellComp', 'D') + let buf = RunVimInTerminal('-S XtestSpellComp', {'rows': 8}) + + call term_sendkeys(buf, "51|C") + call VerifyScreenDump(buf, 'Test_spell_compatible_1', {}) + + call term_sendkeys(buf, "x") + call VerifyScreenDump(buf, 'Test_spell_compatible_2', {}) + + " clean up + call StopVimInTerminal(buf) endfunc let g:test_data_aff1 = [ |