fix: oil.close() sometimes closes window too (#64)
This commit is contained in:
parent
383971b0cf
commit
d48fa09c82
2 changed files with 23 additions and 3 deletions
|
|
@ -47,4 +47,19 @@ a.describe("regression tests", function()
|
|||
a.util.sleep(10)
|
||||
assert.equals(winid, vim.api.nvim_get_current_win())
|
||||
end)
|
||||
|
||||
-- https://github.com/stevearc/oil.nvim/issues/64
|
||||
a.it("doesn't close splits on oil.close", function()
|
||||
vim.cmd.edit({ args = { "README.md" } })
|
||||
vim.cmd.vsplit()
|
||||
local winid = vim.api.nvim_get_current_win()
|
||||
local bufnr = vim.api.nvim_get_current_buf()
|
||||
oil.open()
|
||||
a.util.sleep(10)
|
||||
oil.close()
|
||||
a.util.sleep(10)
|
||||
assert.equals(2, #vim.api.nvim_tabpage_list_wins(0))
|
||||
assert.equals(winid, vim.api.nvim_get_current_win())
|
||||
assert.equals(bufnr, vim.api.nvim_get_current_buf())
|
||||
end)
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue