comparison 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
comparison
equal deleted inserted replaced
30658:3e426037fd19 30659:ea16b081493d
954 \ "And and this is the the duplication.", 954 \ "And and this is the the duplication.",
955 \ "with missing caps here.", 955 \ "with missing caps here.",
956 \ ]) 956 \ ])
957 set spell spelllang=en_nz 957 set spell spelllang=en_nz
958 END 958 END
959 call writefile(lines, 'XtestSpell') 959 call writefile(lines, 'XtestSpell', 'D')
960 let buf = RunVimInTerminal('-S XtestSpell', {'rows': 8}) 960 let buf = RunVimInTerminal('-S XtestSpell', {'rows': 8})
961 call VerifyScreenDump(buf, 'Test_spell_1', {}) 961 call VerifyScreenDump(buf, 'Test_spell_1', {})
962 962
963 " clean up 963 " clean up
964 call StopVimInTerminal(buf) 964 call StopVimInTerminal(buf)
965 call delete('XtestSpell')
966 endfunc 965 endfunc
967 966
968 func Test_spell_screendump_spellcap() 967 func Test_spell_screendump_spellcap()
969 CheckScreendump 968 CheckScreendump
970 969
977 \ " ", 976 \ " ",
978 \ "and here." 977 \ "and here."
979 \ ]) 978 \ ])
980 set spell spelllang=en 979 set spell spelllang=en
981 END 980 END
982 call writefile(lines, 'XtestSpellCap') 981 call writefile(lines, 'XtestSpellCap', 'D')
983 let buf = RunVimInTerminal('-S XtestSpellCap', {'rows': 8}) 982 let buf = RunVimInTerminal('-S XtestSpellCap', {'rows': 8})
984 call VerifyScreenDump(buf, 'Test_spell_2', {}) 983 call VerifyScreenDump(buf, 'Test_spell_2', {})
985 984
986 " After adding word missing Cap in next line is updated 985 " After adding word missing Cap in next line is updated
987 call term_sendkeys(buf, "3GANot\<Esc>") 986 call term_sendkeys(buf, "3GANot\<Esc>")
995 call term_sendkeys(buf, "u:\<Esc>") 994 call term_sendkeys(buf, "u:\<Esc>")
996 call VerifyScreenDump(buf, 'Test_spell_5', {}) 995 call VerifyScreenDump(buf, 'Test_spell_5', {})
997 996
998 " clean up 997 " clean up
999 call StopVimInTerminal(buf) 998 call StopVimInTerminal(buf)
1000 call delete('XtestSpellCap') 999 endfunc
1000
1001 func Test_spell_compatible()
1002 CheckScreendump
1003
1004 let lines =<< trim END
1005 call setline(1, [
1006 \ "test "->repeat(20),
1007 \ "",
1008 \ "end",
1009 \ ])
1010 set spell cpo+=$
1011 END
1012 call writefile(lines, 'XtestSpellComp', 'D')
1013 let buf = RunVimInTerminal('-S XtestSpellComp', {'rows': 8})
1014
1015 call term_sendkeys(buf, "51|C")
1016 call VerifyScreenDump(buf, 'Test_spell_compatible_1', {})
1017
1018 call term_sendkeys(buf, "x")
1019 call VerifyScreenDump(buf, 'Test_spell_compatible_2', {})
1020
1021 " clean up
1022 call StopVimInTerminal(buf)
1001 endfunc 1023 endfunc
1002 1024
1003 let g:test_data_aff1 = [ 1025 let g:test_data_aff1 = [
1004 \"SET ISO8859-1", 1026 \"SET ISO8859-1",
1005 \"TRY esianrtolcdugmphbyfvkwjkqxz-\xEB\xE9\xE8\xEA\xEF\xEE\xE4\xE0\xE2\xF6\xFC\xFB'ESIANRTOLCDUGMPHBYFVKWJKQXZ", 1027 \"TRY esianrtolcdugmphbyfvkwjkqxz-\xEB\xE9\xE8\xEA\xEF\xEE\xE4\xE0\xE2\xF6\xFC\xFB'ESIANRTOLCDUGMPHBYFVKWJKQXZ",