From e4bc05b41587b6f95be3da26f0bccecc09aa5832 Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Sun, 27 Oct 2024 10:48:17 +1100 Subject: [PATCH 1/2] doc: remove outdated warning from actions.change_dir.global --- doc/nvim-tree-lua.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/nvim-tree-lua.txt b/doc/nvim-tree-lua.txt index 8038ce8e..968218c6 100644 --- a/doc/nvim-tree-lua.txt +++ b/doc/nvim-tree-lua.txt @@ -1447,8 +1447,6 @@ vim |current-directory| behaviour. *nvim-tree.actions.change_dir.global* Use `:cd` instead of `:lcd` when changing directories. - Consider that this might cause issues with the - |nvim-tree.sync_root_with_cwd| option. Type: `boolean`, Default: `false` *nvim-tree.actions.change_dir.restrict_above_cwd* From 14039337a563f4efd72831888f332a15585f0ea1 Mon Sep 17 00:00:00 2001 From: cpp_programmer Date: Sun, 27 Oct 2024 00:26:47 -0600 Subject: [PATCH 2/2] fix(#2969): After a rename, the node loses selection (#2974) Co-authored-by: Lucian Ion --- lua/nvim-tree/actions/fs/rename-file.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/nvim-tree/actions/fs/rename-file.lua b/lua/nvim-tree/actions/fs/rename-file.lua index da1ca001..efe40a34 100644 --- a/lua/nvim-tree/actions/fs/rename-file.lua +++ b/lua/nvim-tree/actions/fs/rename-file.lua @@ -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