diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-09-22 14:18:13 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-09-22 14:18:13 +0200 |
commit | 40fa12aea352474d229f2f750e954a4318aead4e (patch) | |
tree | 329c91648cafc043a13456fca572ed847f427f1e /src/testdir/test_autocmd.vim | |
parent | da0b497c6e4e01447669773a931b0eaa5ca757f3 (diff) |
patch 8.2.3453: autocmd not executed when editing a directoryv8.2.3453
Problem: Autocmd not executed when editing a directory ending in a path
separator inside try block.
Solution: Return NOTDONE instead of FAIL. (closes #8885)
Diffstat (limited to 'src/testdir/test_autocmd.vim')
-rw-r--r-- | src/testdir/test_autocmd.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim index b2e4952be0..f769eec17f 100644 --- a/src/testdir/test_autocmd.vim +++ b/src/testdir/test_autocmd.vim @@ -2346,6 +2346,19 @@ func Test_throw_in_BufWritePre() au! throwing endfunc +func Test_autocmd_in_try_block() + call mkdir('Xdir') + au BufEnter * let g:fname = expand('%') + try + edit Xdir/ + endtry + call assert_match('Xdir', g:fname) + + unlet g:fname + au! BufEnter + call delete('Xdir', 'rf') +endfunc + func Test_autocmd_SafeState() CheckRunVimInTerminal |