mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
API: nvim_win_close: Fix closing cmdline-window #10087
This commit is contained in:
committed by
Justin M. Keyes
parent
278c5d452c
commit
5f243fc68a
@@ -322,5 +322,20 @@ describe('API/win', function()
|
||||
meths.win_close(oldwin,true)
|
||||
eq({newwin}, meths.list_wins())
|
||||
end)
|
||||
|
||||
it('in cmdline-window #9767', function()
|
||||
command('split')
|
||||
eq(2, #meths.list_wins())
|
||||
-- Open cmdline-window.
|
||||
feed('q:')
|
||||
eq(3, #meths.list_wins())
|
||||
eq(':', funcs.getcmdwintype())
|
||||
-- Vim: not allowed to close other windows from cmdline-window.
|
||||
expect_err('Invalid window id$', meths.win_close, 1, true)
|
||||
-- Close cmdline-window.
|
||||
meths.win_close(0,true)
|
||||
eq(2, #meths.list_wins())
|
||||
eq('', funcs.getcmdwintype())
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user