0
0
mirror of https://github.com/vim/vim.git synced 2025-10-28 09:27:14 -04:00

patch 8.2.4438: crash on exit when using cmdline window

Problem:    Crash on exit when using cmdline window.
Solution:   Reset "cmdwin_type" before exiting. (closes #9817)
This commit is contained in:
Bram Moolenaar
2022-02-22 12:08:07 +00:00
parent 0f113e4f7b
commit ca0c1caa36
3 changed files with 19 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
" Tests for exiting Vim.
source shared.vim
source check.vim
func Test_exiting()
let after =<< trim [CODE]
@@ -109,4 +110,17 @@ func Test_exit_code()
call delete('Xtestout')
endfunc
func Test_exit_error_reading_input()
CheckNotGui
call writefile([":au VimLeave * call writefile(['l = ' .. v:exiting], 'Xtestout')", ":tabnew\<CR>q:"], 'Xscript')
if RunVim([], [], '< Xscript')
call assert_equal(['l = 1'], readfile('Xtestout'))
endif
call delete('Xscript')
call delete('Xtestout')
endfun
" vim: shiftwidth=2 sts=2 expandtab