summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_spell.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-11-14 20:52:14 +0000
committerBram Moolenaar <Bram@vim.org>2022-11-14 20:52:14 +0000
commitc3d27ada14acd02db357f2d16347acc22cb17e93 (patch)
treea10911ea76709d00e0014de4abf82cc1f1a47cd8 /src/testdir/test_spell.vim
parent24dc19cdb2ce7cda2156d3b2eca6aee552b097dc (diff)
patch 9.0.0882: using freed memory after SpellFileMissing autocmd uses bwipev9.0.0882
Problem: Using freed memory after SpellFileMissing autocmd uses bwipe. Solution: Bail out if the window no longer exists.
Diffstat (limited to 'src/testdir/test_spell.vim')
-rw-r--r--src/testdir/test_spell.vim13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/testdir/test_spell.vim b/src/testdir/test_spell.vim
index 4a7a46c5b3..bd387f11d2 100644
--- a/src/testdir/test_spell.vim
+++ b/src/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.