Mercurial > vim
diff src/testdir/test_spell.vim @ 28077:ba9f1a9ddaf9 v8.2.4563
patch 8.2.4563: "z=" in Visual mode may go beyond the end of the line
Commit: https://github.com/vim/vim/commit/5c68617d395f9d7b824f68475b24ce3e38d653a3
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 13 20:12:25 2022 +0000
patch 8.2.4563: "z=" in Visual mode may go beyond the end of the line
Problem: "z=" in Visual mode may go beyond the end of the line.
Solution: Adjust "badlen".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 13 Mar 2022 21:15:03 +0100 |
parents | 674240fcf6de |
children | b4c111ea83b1 |
line wrap: on
line diff
--- a/src/testdir/test_spell.vim +++ b/src/testdir/test_spell.vim @@ -456,6 +456,21 @@ func Test_spellsuggest_timeout() call assert_fails('set spellsuggest=timeout:--9', 'E474:') endfunc +func Test_spellsuggest_visual_end_of_line() + let enc_save = &encoding + set encoding=iso8859 + + " This was reading beyond the end of the line. + norm R00000000000 + sil norm 0 + sil! norm i00000) + sil! norm i00000) + call feedkeys("\<CR>") + norm z= + + let &encoding = enc_save +endfunc + func Test_spellinfo() new let runtime = substitute($VIMRUNTIME, '\\', '/', 'g')