comparison 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
comparison
equal deleted inserted replaced
9449:76bbfac1cc81 9450:073aebdba121
58 bwipeout 58 bwipeout
59 call assert_equal(["bufunload", "bufdelete", "bufwipeout"], s:li) 59 call assert_equal(["bufunload", "bufdelete", "bufwipeout"], s:li)
60 60
61 augroup! test_bufunload_group 61 augroup! test_bufunload_group
62 endfunc 62 endfunc
63
64 " SEGV occurs in older versions. (At least 7.4.2005 or older)
65 function Test_autocmd_bufunload_with_tabnext()
66 tabedit
67 tabfirst
68
69 augroup test_autocmd_bufunload_with_tabnext_group
70 autocmd!
71 autocmd BufUnload <buffer> tabnext
72 augroup END
73
74 quit
75 call assert_equal(2, tabpagenr('$'))
76
77 augroup! test_autocmd_bufunload_with_tabnext_group
78 tablast
79 quit
80 endfunc