aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-15 07:58:22 +0800
committerGitHub <noreply@github.com>2022-11-15 07:58:22 +0800
commit74399738510cb880507cba14f71acc0a96e14327 (patch)
tree456f4d35f86870277fb6e4a67d482811fb58e349 /src/nvim/testdir
parent2685d27cd65ea255f9bf1fce44a355e235016212 (diff)
downloadrneovim-74399738510cb880507cba14f71acc0a96e14327.tar.gz
rneovim-74399738510cb880507cba14f71acc0a96e14327.tar.bz2
rneovim-74399738510cb880507cba14f71acc0a96e14327.zip
vim-patch:9.0.0882: using freed memory after SpellFileMissing autocmd uses bwipe (#21060)
Problem: Using freed memory after SpellFileMissing autocmd uses bwipe. Solution: Bail out if the window no longer exists. https://github.com/vim/vim/commit/c3d27ada14acd02db357f2d16347acc22cb17e93 Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_spell.vim13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_spell.vim b/src/nvim/testdir/test_spell.vim
index ea18fc5194..a919156066 100644
--- a/src/nvim/testdir/test_spell.vim
+++ b/src/nvim/testdir/test_spell.vim
@@ -159,6 +159,19 @@ func Test_spell_file_missing()
%bwipe!
endfunc
+func Test_spell_file_missing_bwipe()
+ " this was using a window that was wiped out in a SpellFileMissing autocmd
+ set spelllang=xy
+ au SpellFileMissing * n0
+ set spell
+ au SpellFileMissing * bw
+ snext somefile
+
+ au! SpellFileMissing
+ bwipe!
+ set nospell spelllang=en
+endfunc
+
func Test_spelldump()
" In case the spell file is not found avoid getting the download dialog, we
" would get stuck at the prompt.