aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-03-27 10:33:05 +0800
committerGitHub <noreply@github.com>2022-03-27 10:33:05 +0800
commit71b4c30ad6215742ffcb8dfb0fb4df899065cb7a (patch)
treeb4367538dee666321835525be7c5634d26f8fea9 /src/nvim/testdir
parenta490db5ba819218e9188cbb51d885dbf3a194000 (diff)
parentae0a43ec23d9d902d2d9c446dda592873988ea50 (diff)
downloadrneovim-71b4c30ad6215742ffcb8dfb0fb4df899065cb7a.tar.gz
rneovim-71b4c30ad6215742ffcb8dfb0fb4df899065cb7a.tar.bz2
rneovim-71b4c30ad6215742ffcb8dfb0fb4df899065cb7a.zip
Merge pull request #17877 from zeertzjq/vim-8.2.4631
vim-patch:8.2.4631: crash when switching window in BufWipeout autocommand
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_autocmd.vim17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim
index d4005e41e8..76c69ad10b 100644
--- a/src/nvim/testdir/test_autocmd.vim
+++ b/src/nvim/testdir/test_autocmd.vim
@@ -2611,4 +2611,21 @@ func Test_autocmd_closing_cmdwin()
only
endfunc
+func Test_bufwipeout_changes_window()
+ " This should not crash, but we don't have any expectations about what
+ " happens, changing window in BufWipeout has unpredictable results.
+ tabedit
+ let g:window_id = win_getid()
+ topleft new
+ setlocal bufhidden=wipe
+ autocmd BufWipeout <buffer> call win_gotoid(g:window_id)
+ tabprevious
+ +tabclose
+
+ unlet g:window_id
+ au! BufWipeout
+ %bwipe!
+endfunc
+
+
" vim: shiftwidth=2 sts=2 expandtab