Skip to content

Commit

Permalink
fix: ensure win_options are being set on correct window (#469)
Browse files Browse the repository at this point in the history
* Added check for filetype before setting win_options in initialize

* refactor: use nvim_buf_call to set window options

---------

Co-authored-by: Steven Arcangeli <[email protected]>
  • Loading branch information
csponge and stevearc authored Aug 29, 2024
1 parent 0fcd126 commit 30e0438
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/oil/view.lua
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ M.initialize = function(bufnr)
for k, v in pairs(config.buf_options) do
vim.bo[bufnr][k] = v
end
M.set_win_options()
vim.api.nvim_buf_call(bufnr, M.set_win_options)

vim.api.nvim_create_autocmd("BufHidden", {
desc = "Delete oil buffers when no longer in use",
group = "Oil",
Expand Down

0 comments on commit 30e0438

Please sign in to comment.