fix(#2969): After a rename, the node loses selection (#2974)

Co-authored-by: Lucian Ion <lucian.ion.2005@gmail.com>
This commit is contained in:
cpp_programmer 2024-10-27 00:26:47 -06:00 committed by GitHub
parent e4bc05b415
commit 14039337a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -161,12 +161,14 @@ function M.fn(default_modifier)
return
end
M.rename(node, prepend .. new_file_path .. append)
local full_new_path = prepend .. new_file_path .. append
M.rename(node, full_new_path)
if not M.config.filesystem_watchers.enable then
explorer:reload_explorer()
end
find_file(utils.path_remove_trailing(new_file_path))
find_file(utils.path_remove_trailing(full_new_path))
end)
end
end