mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.2.4454: resetting cmdwin_type only for one situation
Problem: Resetting cmdwin_type only for one situation.
Solution: Reset cmdwin_type before closing windows. (closes vim/vim#9822)
6a8b13614e
Move the check to win_free_all to match Vim.
This commit is contained in:
parent
70582bd925
commit
7e19c18a54
@ -575,9 +575,6 @@ void free_all_mem(void)
|
|||||||
// Don't want to trigger autocommands from here on.
|
// Don't want to trigger autocommands from here on.
|
||||||
block_autocmds();
|
block_autocmds();
|
||||||
|
|
||||||
// Ensure cmdline window doesn't prevent closing tabs and windows.
|
|
||||||
cmdwin_type = 0;
|
|
||||||
|
|
||||||
// Close all tabs and windows. Reset 'equalalways' to avoid redraws.
|
// Close all tabs and windows. Reset 'equalalways' to avoid redraws.
|
||||||
p_ea = false;
|
p_ea = false;
|
||||||
if (first_tabpage->tp_next != NULL) {
|
if (first_tabpage->tp_next != NULL) {
|
||||||
|
@ -123,6 +123,7 @@ func Test_exit_error_reading_input()
|
|||||||
" Nvim requires "-s -" to read stdin as Normal mode input
|
" Nvim requires "-s -" to read stdin as Normal mode input
|
||||||
" if RunVim([], [], '<Xscript')
|
" if RunVim([], [], '<Xscript')
|
||||||
if RunVim([], [], '-s - <Xscript')
|
if RunVim([], [], '-s - <Xscript')
|
||||||
|
call assert_equal(1, v:shell_error)
|
||||||
call assert_equal(['l = 1'], readfile('Xtestout'))
|
call assert_equal(['l = 1'], readfile('Xtestout'))
|
||||||
endif
|
endif
|
||||||
call delete('Xscript')
|
call delete('Xscript')
|
||||||
|
@ -2904,6 +2904,9 @@ void win_free_all(void)
|
|||||||
{
|
{
|
||||||
int dummy;
|
int dummy;
|
||||||
|
|
||||||
|
// avoid an error for switching tabpage with the cmdline window open
|
||||||
|
cmdwin_type = 0;
|
||||||
|
|
||||||
while (first_tabpage->tp_next != NULL) {
|
while (first_tabpage->tp_next != NULL) {
|
||||||
tabpage_close(TRUE);
|
tabpage_close(TRUE);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user