From eb8cbfc8f514c5c84741f782314dc9c256b6d977 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 11 Mar 2017 13:56:23 +0100 Subject: vim-patch:8.0.0068 (#6243) Problem: Checking did_throw after executing autocommands is wrong. (Daniel Hahler) Solution: Call aborting() instead, and only when autocommands were executed. https://github.com/vim/vim/commit/21662be2211675824df1771c7f169948ede40c41 --- src/nvim/testdir/test_quickfix.vim | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index 50fe6ce977..044c288ce0 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -1560,3 +1560,20 @@ function Test_Autocmd() \ 'postcaddbuffer'] call assert_equal(l, g:acmds) endfunction + +function! Test_Autocmd_Exception() + set efm=%m + lgetexpr '?' + + try + call DoesNotExit() + catch + lgetexpr '1' + finally + lgetexpr '1' + endtry + + call assert_equal('1', getloclist(0)[0].text) + + set efm&vim +endfunction -- cgit