Skip to content

Commit

Permalink
fix: correctly reset bufhidden for formerly previewed buffers (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Mar 13, 2024
1 parent 17d71eb commit 0de8e60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/oil/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,7 @@ M.setup = function(opts)
callback = function()
-- If we have entered a "preview" buffer in a non-preview window, reset bufhidden
if vim.b.oil_preview_buffer and not vim.wo.previewwindow then
vim.bo.bufhidden = vim.o.bufhidden
vim.bo.bufhidden = vim.api.nvim_get_option_value("bufhidden", { scope = "global" })
vim.b.oil_preview_buffer = nil
end
end,
Expand Down

0 comments on commit 0de8e60

Please sign in to comment.