Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
23860:a8e6303f7da7 | 23861:5d11a15dbaa9 |
---|---|
2737 | 2737 |
2738 func Test_autocmd_closes_window() | 2738 func Test_autocmd_closes_window() |
2739 au BufNew,BufWinLeave * e %e | 2739 au BufNew,BufWinLeave * e %e |
2740 file yyy | 2740 file yyy |
2741 au BufNew,BufWinLeave * ball | 2741 au BufNew,BufWinLeave * ball |
2742 call assert_fails('n xxx', 'E143:') | 2742 n xxx |
2743 | 2743 |
2744 bwipe % | 2744 %bwipe |
2745 au! BufNew | 2745 au! BufNew |
2746 au! BufWinLeave | 2746 au! BufWinLeave |
2747 endfunc | 2747 endfunc |
2748 | 2748 |
2749 func Test_autocmd_quit_psearch() | 2749 func Test_autocmd_quit_psearch() |
2757 augroup aucmd_win_test | 2757 augroup aucmd_win_test |
2758 au! | 2758 au! |
2759 augroup END | 2759 augroup END |
2760 endfunc | 2760 endfunc |
2761 | 2761 |
2762 " Fuzzer found some strange combination that caused a crash. | |
2763 func Test_autocmd_normal_mess() | |
2764 augroup aucmd_normal_test | |
2765 au BufLeave,BufWinLeave,BufHidden,BufUnload,BufDelete,BufWipeout * norm 7q/qc | |
2766 augroup END | |
2767 o4 | |
2768 silent! H | |
2769 e xx | |
2770 normal G | |
2771 | |
2772 augroup aucmd_normal_test | |
2773 au! | |
2774 augroup END | |
2775 endfunc | |
2776 | |
2762 " vim: shiftwidth=2 sts=2 expandtab | 2777 " vim: shiftwidth=2 sts=2 expandtab |