api: add nvim_win_close() to close window by id

This commit is contained in:
Björn Linse
2019-03-03 10:26:11 +01:00
parent 7a6da502b9
commit c8f310825c
4 changed files with 96 additions and 1 deletions

View File

@@ -118,6 +118,37 @@ describe('floating windows', function()
|
]])
end
meths.win_close(win, false)
if multigrid then
screen:expect([[
## grid 1
[2:----------------------------------------]|
[2:----------------------------------------]|
[2:----------------------------------------]|
[2:----------------------------------------]|
[2:----------------------------------------]|
[2:----------------------------------------]|
|
## grid 2
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
]])
else
screen:expect([[
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
|
]])
end
end)
it('API has proper error messages', function()