From b314b3a6992f07f7af5c58521d1e219b032d309e Mon Sep 17 00:00:00 2001 From: Carlos Castillo <47466248+carlosecp@users.noreply.github.com> Date: Sun, 14 Aug 2022 02:00:04 -0300 Subject: [PATCH] fix(#1500): focusing directories with a trailing slash in their path doesn't work (#1501) --- lua/nvim-tree/actions/fs/create-file.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/nvim-tree/actions/fs/create-file.lua b/lua/nvim-tree/actions/fs/create-file.lua index 06dcb9c6..d5544e8b 100644 --- a/lua/nvim-tree/actions/fs/create-file.lua +++ b/lua/nvim-tree/actions/fs/create-file.lua @@ -108,7 +108,7 @@ function M.fn(node) end -- INFO: defer needed when reload is automatic (watchers) vim.defer_fn(function() - utils.focus_file(new_file_path) + utils.focus_file(utils.path_remove_trailing(new_file_path)) end, 150) end) end