comparison src/testdir/test_autocmd.vim @ 33341:3dd54b0dab14 v9.0.1934

patch 9.0.1934: :bwipe fails after switching window from aucmd_win. Commit: https://github.com/vim/vim/commit/46bdae036ac4121e305fc3ed4ef3f9fc928dcb25 Author: zeertzjq <zeertzjq@outlook.com> Date: Sun Sep 24 23:16:08 2023 +0200 patch 9.0.1934: :bwipe fails after switching window from aucmd_win. Problem: :bwipe fails after switching window from aucmd_win. Solution: Decrement b_nwindows after switching back to aucmd_win. closes: #13160 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
author Christian Brabandt <cb@256bit.org>
date Sun, 24 Sep 2023 23:30:04 +0200
parents def9fc5c92d1
children 830a5f8053cb
comparison
equal deleted inserted replaced
33340:6ea17e0f7de4 33341:3dd54b0dab14
3628 autocmd BufEnter Xa.txt unhide 1 3628 autocmd BufEnter Xa.txt unhide 1
3629 doautoall BufEnter 3629 doautoall BufEnter
3630 END 3630 END
3631 call v9.CheckScriptFailure(lines, 'E814:') 3631 call v9.CheckScriptFailure(lines, 'E814:')
3632 au! BufEnter 3632 au! BufEnter
3633 only!
3634 bwipe Xa.txt 3633 bwipe Xa.txt
3635 bwipe Xb.txt 3634 bwipe Xb.txt
3635 endfunc
3636
3637 func Test_switch_window_in_autocmd_window()
3638 edit Xa.txt
3639 tabnew Xb.txt
3640 autocmd BufEnter Xa.txt wincmd w
3641 doautoall BufEnter
3642 au! BufEnter
3643 bwipe Xa.txt
3644 call assert_false(bufexists('Xa.txt'))
3645 bwipe Xb.txt
3646 call assert_false(bufexists('Xb.txt'))
3636 endfunc 3647 endfunc
3637 3648
3638 func Test_bufwipeout_changes_window() 3649 func Test_bufwipeout_changes_window()
3639 " This should not crash, but we don't have any expectations about what 3650 " This should not crash, but we don't have any expectations about what
3640 " happens, changing window in BufWipeout has unpredictable results. 3651 " happens, changing window in BufWipeout has unpredictable results.