diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-05-11 21:20:32 -0400 |
|---|---|---|
| committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-05-13 20:46:00 -0400 |
| commit | f54a938271a4006a05638956a46e0bbe114eedf7 (patch) | |
| tree | 1fbcf0320d046fc4622ac2fe8e407e6f34c65d70 /src/nvim/testdir | |
| parent | 73392909006de74e628323cde915b107244a247b (diff) | |
| download | rneovim-f54a938271a4006a05638956a46e0bbe114eedf7.tar.gz rneovim-f54a938271a4006a05638956a46e0bbe114eedf7.tar.bz2 rneovim-f54a938271a4006a05638956a46e0bbe114eedf7.zip | |
vim-patch:8.2.1059: crash when using :tabonly in an autocommand
Problem: Crash when using :tabonly in an autocommand. (Yegappan Lakshmanan)
Solution: Do not allow the autocommand window to be closed.
https://github.com/vim/vim/commit/cf8441704d6e517bda1899f4afa82c6b4eecbaec
E813 error message does not mention 'popup' window
because Neovim floating window are regular windows, unlike Vim popups.
https://github.com/neovim/neovim/pull/14532#discussion_r631731829
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_autocmd.vim | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim index 5611560b1b..fb3aa2b3b0 100644 --- a/src/nvim/testdir/test_autocmd.vim +++ b/src/nvim/testdir/test_autocmd.vim @@ -1949,6 +1949,26 @@ func Test_autocmd_window() %bw! endfunc +" Test for trying to close the tab that has the temporary window for exeucing +" an autocmd. +func Test_close_autocmd_tab() + edit one.txt + tabnew two.txt + augroup aucmd_win_test + au! + au BufEnter * if expand('<afile>') == 'one.txt' | tabfirst | tabonly | endif + augroup END + + call assert_fails('doautoall BufEnter', 'E813:') + + tabonly + augroup aucmd_win_test + au! + augroup END + augroup! aucmd_win_test + %bwipe! +endfunc + func Test_autocmd_closes_window() au BufNew,BufWinLeave * e %e file yyy |