From b1449bf914132b018c59cb2ec82dd9e31538ab65 Mon Sep 17 00:00:00 2001 From: rapan931 <24415677+rapan931@users.noreply.github.com> Date: Thu, 29 Sep 2022 20:44:59 +0900 Subject: [PATCH] fix: restore eventignore --- lua/nvim-tree/actions/node/open-file.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/nvim-tree/actions/node/open-file.lua b/lua/nvim-tree/actions/node/open-file.lua index ccf746ef7dd..1828e1d066f 100644 --- a/lua/nvim-tree/actions/node/open-file.lua +++ b/lua/nvim-tree/actions/node/open-file.lua @@ -168,9 +168,10 @@ end -- This is only to avoid the BufEnter for nvim-tree to trigger -- which would cause find-file to run on an invalid file. local function set_current_win_no_autocmd(winid) - vim.cmd "set ei=BufEnter" + local eventignore = vim.opt.eventignore:get() + vim.opt.eventignore:append "BufEnter" api.nvim_set_current_win(winid) - vim.cmd 'set ei=""' + vim.opt.eventignore = eventignore end local function open_in_new_window(filename, mode, win_ids)