diff options
author | R. Simon <rasimon22@gmail.com> | 2019-08-10 06:41:35 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-08-10 13:41:35 +0200 |
commit | 5f243fc68ad0ab9c3bdf484c8f2753ec9414bf37 (patch) | |
tree | 73911f0c12875a5057944b2ff562399ee7c1f13d /test/functional/api/window_spec.lua | |
parent | 278c5d452c2cbc436a9cc317407ae6021a226c3a (diff) | |
download | rneovim-5f243fc68ad0ab9c3bdf484c8f2753ec9414bf37.tar.gz rneovim-5f243fc68ad0ab9c3bdf484c8f2753ec9414bf37.tar.bz2 rneovim-5f243fc68ad0ab9c3bdf484c8f2753ec9414bf37.zip |
API: nvim_win_close: Fix closing cmdline-window #10087
Diffstat (limited to 'test/functional/api/window_spec.lua')
-rw-r--r-- | test/functional/api/window_spec.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/api/window_spec.lua b/test/functional/api/window_spec.lua index 4ff299cd18..c3a9b987f2 100644 --- a/test/functional/api/window_spec.lua +++ b/test/functional/api/window_spec.lua @@ -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) |