Skip to content

Commit 11b5248

Browse files
authored
fix: restore eventignore (#1612)
1 parent 9914780 commit 11b5248

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lua/nvim-tree/actions/node/open-file.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,10 @@ end
168168
-- This is only to avoid the BufEnter for nvim-tree to trigger
169169
-- which would cause find-file to run on an invalid file.
170170
local function set_current_win_no_autocmd(winid)
171-
vim.cmd "set ei=BufEnter"
171+
local eventignore = vim.opt.eventignore:get()
172+
vim.opt.eventignore:append "BufEnter"
172173
api.nvim_set_current_win(winid)
173-
vim.cmd 'set ei=""'
174+
vim.opt.eventignore = eventignore
174175
end
175176

176177
local function open_in_new_window(filename, mode, win_ids)

0 commit comments

Comments
 (0)