aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-05 06:47:58 +0800
committerGitHub <noreply@github.com>2022-07-05 06:47:58 +0800
commitd07a39c54b1ecd767590821601c33164df4ba3e0 (patch)
tree62bc70c78090167b63ad8343cc944bffd56d45b1 /src/nvim/testdir
parent826fe56f5cf30a823dc627b8a710174d04004cef (diff)
downloadrneovim-d07a39c54b1ecd767590821601c33164df4ba3e0.tar.gz
rneovim-d07a39c54b1ecd767590821601c33164df4ba3e0.tar.bz2
rneovim-d07a39c54b1ecd767590821601c33164df4ba3e0.zip
vim-patch:9.0.0035: spell dump may go beyond end of an array (#19228)
Problem: Spell dump may go beyond end of an array. Solution: Limit the word length. https://github.com/vim/vim/commit/54e5fed6d27b747ff152cdb6edfb72ff60e70939
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_spell.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_spell.vim b/src/nvim/testdir/test_spell.vim
index 1db0a01bd8..5099818384 100644
--- a/src/nvim/testdir/test_spell.vim
+++ b/src/nvim/testdir/test_spell.vim
@@ -287,6 +287,18 @@ func Test_spellreall()
bwipe!
endfunc
+func Test_spell_dump_word_length()
+ " this was running over MAXWLEN
+ new
+ noremap 0 0a0zW0000000
+ sil! norm 0z=0
+ sil norm 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+ sil! norm 0z=0
+
+ bwipe!
+ nunmap 0
+endfunc
+
" Test spellsuggest({word} [, {max} [, {capital}]])
func Test_spellsuggest()
" Verify suggestions are given even when spell checking is not enabled.