Skip to content

Commit 3d66596

Browse files
committed
fix: do not use cwd on refresh if bind_to_cwd = false, fixes #339
1 parent dbd4d67 commit 3d66596

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lua/neo-tree/sources/filesystem/init.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ M._navigate_internal = function(state, path, path_to_reveal, callback, async)
118118
state.dirty = false
119119
local is_search = utils.truthy(state.search_pattern)
120120
local path_changed = false
121+
if not path and not state.bind_to_cwd then
122+
path = state.path
123+
end
121124
if path == nil then
122125
log.debug("navigate_internal: path is nil, using cwd")
123126
path = manager.get_cwd(state)

0 commit comments

Comments
 (0)