aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-01-15 06:32:35 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-01-15 07:59:45 +0800
commit89f45dc155d24e797c144b32de109b64368f20ea (patch)
tree9c152a7df56e1f3b1eeb771f9424d50233c9d20e /src/nvim/testdir
parentfe17cd50fbff5ebed44b6b0d46f3dc933696c1da (diff)
downloadrneovim-89f45dc155d24e797c144b32de109b64368f20ea.tar.gz
rneovim-89f45dc155d24e797c144b32de109b64368f20ea.tar.bz2
rneovim-89f45dc155d24e797c144b32de109b64368f20ea.zip
vim-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". https://github.com/vim/vim/commit/5c68617d395f9d7b824f68475b24ce3e38d653a3 Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_spell.vim17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_spell.vim b/src/nvim/testdir/test_spell.vim
index a919156066..c840e834b9 100644
--- a/src/nvim/testdir/test_spell.vim
+++ b/src/nvim/testdir/test_spell.vim
@@ -531,8 +531,23 @@ 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()
- throw 'skipped: Nvim does not support enc=latin1'
+ throw 'Skipped: Nvim does not support enc=latin1'
new
let runtime = substitute($VIMRUNTIME, '\\', '/', 'g')