fix: set alternate when using floating windows (#526)
This commit is contained in:
parent
78ab7ca107
commit
c5f7c56644
2 changed files with 13 additions and 1 deletions
|
|
@ -141,5 +141,17 @@ a.describe("Alternate buffer", function()
|
|||
oil.close()
|
||||
assert.equals("foo", vim.fn.expand("#"))
|
||||
end)
|
||||
|
||||
a.it("preserves alternate when traversing to a new file", function()
|
||||
vim.cmd.edit({ args = { "foo" } })
|
||||
oil.open_float()
|
||||
test_util.wait_for_autocmd({ "User", pattern = "OilEnter" })
|
||||
assert.equals("foo", vim.fn.expand("#"))
|
||||
test_util.feedkeys({ "/LICENSE<CR>" }, 10)
|
||||
oil.select()
|
||||
test_util.wait_for_autocmd("BufEnter")
|
||||
assert.equals("LICENSE", vim.fn.expand("%:."))
|
||||
assert.equals("foo", vim.fn.expand("#"))
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue