diff src/testdir/test49.vim @ 3918:4f0ddf4137ee v7.3.715

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)
author Bram Moolenaar <bram@vim.org>
date Wed, 14 Nov 2012 22:38:08 +0100
parents 88095f75d63b
children ed936effb1f3
line wrap: on
line diff
--- a/src/testdir/test49.vim
+++ b/src/testdir/test49.vim
@@ -9603,9 +9603,28 @@ delfunction Delete_autocommands
 
 Xcheck 198689
 
-
-"-------------------------------------------------------------------------------
-" Test 86:  $VIMNOERRTHROW and $VIMNOINTTHROW support			    {{{1
+"-------------------------------------------------------------------------------
+" 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 87:  $VIMNOERRTHROW and $VIMNOINTTHROW support			    {{{1
 "
 "	    It is possible to configure Vim for throwing exceptions on error
 "	    or interrupt, controlled by variables $VIMNOERRTHROW and