Mercurial > vim
diff src/testdir/test_autocmd.vim @ 23861:5d11a15dbaa9 v8.2.2472
patch 8.2.2472: crash when using command line window in an autocommand
Commit: https://github.com/vim/vim/commit/aad5f9d79a2b71e9d2581eace3652be156102b9d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 6 17:30:31 2021 +0100
patch 8.2.2472: crash when using command line window in an autocommand
Problem: Crash when using command line window in an autocommand.
(houyunsong)
Solution: Save and restore au_new_curbuf.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 06 Feb 2021 17:45:03 +0100 |
parents | b0e7fa957cd1 |
children | a91f3147d06e |
line wrap: on
line diff
--- a/src/testdir/test_autocmd.vim +++ b/src/testdir/test_autocmd.vim @@ -2739,9 +2739,9 @@ func Test_autocmd_closes_window() au BufNew,BufWinLeave * e %e file yyy au BufNew,BufWinLeave * ball - call assert_fails('n xxx', 'E143:') - - bwipe % + n xxx + + %bwipe au! BufNew au! BufWinLeave endfunc @@ -2759,4 +2759,19 @@ func Test_autocmd_quit_psearch() augroup END endfunc +" Fuzzer found some strange combination that caused a crash. +func Test_autocmd_normal_mess() + augroup aucmd_normal_test + au BufLeave,BufWinLeave,BufHidden,BufUnload,BufDelete,BufWipeout * norm 7q/qc + augroup END + o4 + silent! H + e xx + normal G + + augroup aucmd_normal_test + au! + augroup END +endfunc + " vim: shiftwidth=2 sts=2 expandtab