diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-03-13 12:24:24 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-03-14 11:54:36 -0400 |
commit | 519848f64eda3aacb6d2ceac63c3b52c9ff0c59b (patch) | |
tree | 7944c4b28ab4497f2c830e0c4caf0f7e0f07a9ad /src/nvim/testdir | |
parent | 3c8583e43bcb644d75c17c072ddf6f067439fde1 (diff) | |
download | rneovim-519848f64eda3aacb6d2ceac63c3b52c9ff0c59b.tar.gz rneovim-519848f64eda3aacb6d2ceac63c3b52c9ff0c59b.tar.bz2 rneovim-519848f64eda3aacb6d2ceac63c3b52c9ff0c59b.zip |
vim-patch:8.2.2596: :doautocmd may confuse scripts listening to WinEnter
Problem: :doautocmd may confuse scripts listening to WinEnter.
Solution: Do the current buffer last. (closes vim/vim#7958)
https://github.com/vim/vim/commit/41cd80335cf318c15c8b0139f53ab5e8a02561ef
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_autocmd.vim | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim index 1f3a45a9ab..7788e09d43 100644 --- a/src/nvim/testdir/test_autocmd.vim +++ b/src/nvim/testdir/test_autocmd.vim @@ -1922,20 +1922,28 @@ func Test_autocmd_window() %bw! edit one.txt tabnew two.txt + vnew three.txt + tabnew four.txt + tabprevious let g:blist = [] - augroup aucmd_win_test + augroup aucmd_win_test1 au! au BufEnter * call add(g:blist, [expand('<afile>'), \ win_gettype(bufwinnr(expand('<afile>')))]) augroup END doautoall BufEnter - call assert_equal([['one.txt', 'autocmd'], ['two.txt', '']], g:blist) + call assert_equal([ + \ ['one.txt', 'autocmd'], + \ ['two.txt', ''], + \ ['four.txt', 'autocmd'], + \ ['three.txt', ''], + \ ], g:blist) - augroup aucmd_win_test + augroup aucmd_win_test1 au! augroup END - augroup! aucmd_win_test + augroup! aucmd_win_test1 %bw! endfunc |