Skip to content

Commit ec888d0

Browse files
committed
fix(open file): set target win when opening new file
fixes #1214 Still this is a patch that is not really great. This code should be rewritten.
1 parent 545c43f commit ec888d0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ function M.fn(mode, filename)
247247
cmd = cmd .. vim.fn.fnameescape(filename)
248248
api.nvim_set_current_win(target_winid)
249249
pcall(vim.cmd, cmd)
250+
lib.set_target_win()
250251
end
251252

252253
if M.resize_window then

0 commit comments

Comments
 (0)