From 41b884b27387cd4c0ba1d039ea3bb2b7beac21c2 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 14 Nov 2012 22:38:08 +0100 Subject: 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) --- src/testdir/test49.vim | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'src/testdir/test49.vim') 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 -- cgit v1.2.1