summaryrefslogtreecommitdiff
path: root/src/testdir/test49.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2012-11-14 22:38:08 +0100
committerBram Moolenaar <Bram@vim.org>2012-11-14 22:38:08 +0100
commit41b884b27387cd4c0ba1d039ea3bb2b7beac21c2 (patch)
treeb4f0c194e2e39812a5f04d84706f38d45e0426f7 /src/testdir/test49.vim
parentb826ddb034564828487b0ef94f271262bb902f7c (diff)
downloadvim-41b884b27387cd4c0ba1d039ea3bb2b7beac21c2.zip
updated for version 7.3.715
Problem: Crash when calling setloclist() in BufUnload autocmd. (Marcin Szamotulski) Solution: Set w_llist to NULL when it was freed. Also add a test. (Christian Brabandt)
Diffstat (limited to 'src/testdir/test49.vim')
-rw-r--r--src/testdir/test49.vim21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/testdir/test49.vim b/src/testdir/test49.vim
index 5e24e3024..d17ea54b2 100644
--- a/src/testdir/test49.vim
+++ b/src/testdir/test49.vim
@@ -9603,9 +9603,28 @@ delfunction Delete_autocommands
Xcheck 198689
+"-------------------------------------------------------------------------------
+" Test 86 setloclist crash {{{1
+"
+" Executing a setloclist() on BufUnload shouldn't crash Vim
+"-------------------------------------------------------------------------------
+
+func F
+ au BufUnload * :call setloclist(0, [{'bufnr':1, 'lnum':1, 'col':1, 'text': 'tango down'}])
+
+ :lvimgrep /.*/ *
+endfunc
+
+XpathINIT
+
+ExecAsScript F
+
+delfunction F
+Xout "No Crash for vimgrep on BufUnload"
+Xcheck 0
"-------------------------------------------------------------------------------
-" Test 86: $VIMNOERRTHROW and $VIMNOINTTHROW support {{{1
+" Test 87: $VIMNOERRTHROW and $VIMNOINTTHROW support {{{1
"
" It is possible to configure Vim for throwing exceptions on error
" or interrupt, controlled by variables $VIMNOERRTHROW and