Mercurial > vim
diff src/testdir/test_autocmd.vim @ 9450:073aebdba121 v7.4.2006
commit https://github.com/vim/vim/commit/30445cb6e94698d212ba866ef3e4022ac625540a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 9 15:21:02 2016 +0200
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 09 Jul 2016 15:30:05 +0200 |
parents | 97a9538c37ff |
children | 0190d5de215f |
line wrap: on
line diff
--- 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