mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-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 vim/vim#9817)
ca0c1caa36
Bram also went with the cmdwin_type = 0 solution, but putting it in
read_error_exit isn't ideal and only fixes one specific variant of the bug, so
don't port that change.
Port the test only, but skip it as Nvim does not exit after stdin is exhausted.
Using -es instead does exit, but read_error_exit does not run preserve_exit in
that case, and does not have issues exiting even without resetting cmdwin_type.
Note that the test has problems and is fixed in later patches.
This commit is contained in:
parent
490874f3da
commit
7519af4f0f
@ -1,6 +1,7 @@
|
|||||||
" Tests for exiting Vim.
|
" Tests for exiting Vim.
|
||||||
|
|
||||||
source shared.vim
|
source shared.vim
|
||||||
|
source check.vim
|
||||||
|
|
||||||
func Test_exiting()
|
func Test_exiting()
|
||||||
let after =<< trim [CODE]
|
let after =<< trim [CODE]
|
||||||
@ -109,4 +110,21 @@ func Test_exit_code()
|
|||||||
call delete('Xtestout')
|
call delete('Xtestout')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_exit_error_reading_input()
|
||||||
|
throw 'Skipped: Nvim does not exit after stdin is read'
|
||||||
|
|
||||||
|
CheckNotGui
|
||||||
|
|
||||||
|
call writefile([":au VimLeave * call writefile(['l = ' .. v:exiting], 'Xtestout')", ":tabnew\<CR>q:"], 'Xscript')
|
||||||
|
|
||||||
|
" Nvim requires "-s -" to read stdin as Normal mode input
|
||||||
|
" if RunVim([], [], '< Xscript')
|
||||||
|
if RunVim([], [], '-s - < Xscript')
|
||||||
|
call assert_equal(['l = 1'], readfile('Xtestout'))
|
||||||
|
endif
|
||||||
|
call delete('Xscript')
|
||||||
|
call delete('Xtestout')
|
||||||
|
endfun
|
||||||
|
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
Loading…
Reference in New Issue
Block a user