fix: edge case where window options were not set

This commit is contained in:
Steven Arcangeli 2023-03-18 15:05:59 -07:00
parent 90622106cd
commit b8eaf88c12
2 changed files with 16 additions and 0 deletions

View file

@ -57,4 +57,16 @@ a.describe("window options", function()
vim.cmd.edit({ args = { "README.md" } })
assert.equals("auto", vim.o.signcolumn)
end)
a.it("Sets the window options when re-entering oil buffer", function()
oil.open()
test_util.wait_for_autocmd("BufReadPost")
assert.truthy(vim.w.oil_did_enter)
vim.cmd.edit({ args = { "README.md" } })
assert.falsy(vim.w.oil_did_enter)
oil.open()
assert.truthy(vim.w.oil_did_enter)
vim.cmd.vsplit()
assert.truthy(vim.w.oil_did_enter)
end)
end)