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 #8965)
diff --git a/src/testdir/test_spell_utf8.vim b/src/testdir/test_spell_utf8.vim
index 1f561e4..79dc3e4 100644
--- a/src/testdir/test_spell_utf8.vim
+++ b/src/testdir/test_spell_utf8.vim
@@ -765,4 +765,20 @@
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
+
+
" vim: shiftwidth=2 sts=2 expandtab