aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-06-18 21:12:14 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-06-27 05:33:54 +0800
commitf0d4007f620d0d1aa9f0f051d83030112c4c66f1 (patch)
treefa4633cff203dca0f9522cad69e841793b986342 /src/nvim/testdir
parent80af2c6055cbc393ee73a8a38cef1e498aaae41d (diff)
downloadrneovim-f0d4007f620d0d1aa9f0f051d83030112c4c66f1.tar.gz
rneovim-f0d4007f620d0d1aa9f0f051d83030112c4c66f1.tar.bz2
rneovim-f0d4007f620d0d1aa9f0f051d83030112c4c66f1.zip
vim-patch:8.2.5123: using invalid index when looking for spell suggestions
Problem: Using invalid index when looking for spell suggestions. Solution: Do not decrement the index when it is zero. https://github.com/vim/vim/commit/156d3911952d73b03d7420dc3540215247db0fe8
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_spell.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_spell.vim b/src/nvim/testdir/test_spell.vim
index ce21b8bdc9..215d4387d6 100644
--- a/src/nvim/testdir/test_spell.vim
+++ b/src/nvim/testdir/test_spell.vim
@@ -72,6 +72,16 @@ func Test_z_equal_on_invalid_utf8_word()
bwipe!
endfunc
+func Test_z_equal_on_single_character()
+ " this was decrementing the index below zero
+ new
+ norm a0\Ê
+ norm zW
+ norm z=
+
+ bwipe!
+endfunc
+
" Test spellbadword() with argument
func Test_spellbadword()
set spell