diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-07-09 15:21:02 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-07-09 15:21:02 +0200 |
commit | 30445cb6e94698d212ba866ef3e4022ac625540a (patch) | |
tree | 70ded697cac9ceb7da59dcb6ab3b706e90c9dc1c /src/testdir/test_autocmd.vim | |
parent | ee1deb4a00f39f133558321ec535354497f490c8 (diff) | |
download | vim-30445cb6e94698d212ba866ef3e4022ac625540a.zip |
patch 7.4.2006
Problem: Crash when using tabnext in BufUnload autocmd. (Norio Takagi)
Solution: First check that the current buffer is the right one. (Hirohito
Higashi)
Diffstat (limited to 'src/testdir/test_autocmd.vim')
-rw-r--r-- | src/testdir/test_autocmd.vim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim index 1dceb70cd..187d8d2a2 100644 --- a/src/testdir/test_autocmd.vim +++ b/src/testdir/test_autocmd.vim @@ -60,3 +60,21 @@ function Test_bufunload() augroup! test_bufunload_group endfunc + +" SEGV occurs in older versions. (At least 7.4.2005 or older) +function Test_autocmd_bufunload_with_tabnext() + tabedit + tabfirst + + augroup test_autocmd_bufunload_with_tabnext_group + autocmd! + autocmd BufUnload <buffer> tabnext + augroup END + + quit + call assert_equal(2, tabpagenr('$')) + + augroup! test_autocmd_bufunload_with_tabnext_group + tablast + quit +endfunc |