diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-11-06 14:46:44 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-11-06 14:46:44 +0100 |
commit | 21662be2211675824df1771c7f169948ede40c41 (patch) | |
tree | 581e7302d5aea00e6112561751222bd3b37a2efa /src/testdir | |
parent | 98500fdc6119eb5f02d7a52ab6ffcac3085181be (diff) |
patch 8.0.0068v8.0.0068
Problem: Checking did_throw after executing autocommands is wrong. (Daniel
Hahler)
Solution: Call aborting() instead, and only when autocommands were executed.
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_quickfix.vim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim index 022c12a292..118a015cb0 100644 --- a/src/testdir/test_quickfix.vim +++ b/src/testdir/test_quickfix.vim @@ -1631,3 +1631,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 |