Skip to content

Commit fb014ac

Browse files
committed
fix(files): stop re-opening window on every command, part of #186
1 parent 07257b3 commit fb014ac

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lua/neo-tree/command/init.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,11 @@ M.execute = function(args)
8989
-- Handle position override
9090
local default_position = nt.config[args.source].window.position
9191
local current_position = state.current_position or default_position
92-
local position_changed = args.position ~= current_position
93-
state.current_position = args.position
92+
local position_changed = false
93+
if args.position then
94+
state.position = args.position
95+
position_changed = args.position ~= current_position
96+
end
9497

9598
-- Handle setting directory if requested
9699
local path_changed = false

0 commit comments

Comments
 (0)