diff src/testdir/test_spell.vim @ 30659:ea16b081493d v9.0.0664

patch 9.0.0664: bad redrawing with spell checking, using "C" and "$" in 'cpo' Commit: https://github.com/vim/vim/commit/f3ef026c9897f1d2e3fba47166a4771d507dae91 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Oct 5 13:29:15 2022 +0100 patch 9.0.0664: bad redrawing with spell checking, using "C" and "$" in 'cpo' Problem: Bad redrawing with spell checking, using "C" and "$" in 'cpo'. Solution: Do not redraw the next line when "$" is in 'cpo'. (closes https://github.com/vim/vim/issues/11285)
author Bram Moolenaar <Bram@vim.org>
date Wed, 05 Oct 2022 14:30:04 +0200
parents 4f1f9728d6c3
children ae10b91ac6b3
line wrap: on
line diff
--- 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 = [