aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_spell_utf8.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-06-26 20:09:36 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-06-27 05:33:54 +0800
commitbafb53604a5b03fdc319f49d5c45f71df16038c1 (patch)
tree289f22fdf15c74b0c9713889a86b0c441cf9e692 /src/nvim/testdir/test_spell_utf8.vim
parent516d6318b78c6e7f4734ea155591aa457016aa81 (diff)
downloadrneovim-bafb53604a5b03fdc319f49d5c45f71df16038c1.tar.gz
rneovim-bafb53604a5b03fdc319f49d5c45f71df16038c1.tar.bz2
rneovim-bafb53604a5b03fdc319f49d5c45f71df16038c1.zip
vim-patch:8.2.3484: crash when going through spell suggestions
Problem: Crash when going through spell suggestions. Solution: Limit the text length for finding suggestions to the original length. Do not update buffers when exiting. (closes vim/vim#8965) https://github.com/vim/vim/commit/e275ba4fc994474155fbafe8b87a6d3b477456ba
Diffstat (limited to 'src/nvim/testdir/test_spell_utf8.vim')
-rw-r--r--src/nvim/testdir/test_spell_utf8.vim15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_spell_utf8.vim b/src/nvim/testdir/test_spell_utf8.vim
index 1d323df67e..1841289146 100644
--- a/src/nvim/testdir/test_spell_utf8.vim
+++ b/src/nvim/testdir/test_spell_utf8.vim
@@ -768,6 +768,21 @@ func Test_spellfile_value()
set spellfile=Xdir/Xtest.utf-8.add,Xtest_other.add
endfunc
+func Test_no_crash_with_weird_text()
+ new
+ let lines =<< trim END
+ r<sfile>
+ €
+
+
+ €
+ END
+ call setline(1, lines)
+ exe "%norm \<C-v>ez=>\<C-v>wzG"
+
+ bwipe!
+endfunc
+
" Invalid bytes may cause trouble when creating the word list.
func Test_check_for_valid_word()
call assert_fails("spellgood! 0\xac", 'E1280:')