Skip to content

Commit 0883f6d

Browse files
fix(nvim-tree#2969): After a rename, the node loses selection
1 parent e4bc05b commit 0883f6d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lua/nvim-tree/actions/fs/rename-file.lua

+4-2
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,14 @@ function M.fn(default_modifier)
161161
return
162162
end
163163

164-
M.rename(node, prepend .. new_file_path .. append)
164+
local full_new_path = prepend .. new_file_path .. append
165+
166+
M.rename(node, full_new_path)
165167
if not M.config.filesystem_watchers.enable then
166168
explorer:reload_explorer()
167169
end
168170

169-
find_file(utils.path_remove_trailing(new_file_path))
171+
find_file(utils.path_remove_trailing(full_new_path))
170172
end)
171173
end
172174
end

0 commit comments

Comments
 (0)