-
-
Notifications
You must be signed in to change notification settings - Fork 638
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
Hi,
if i invoke change_root_to_node(), buffers still use the old working directory while the nvim-tree buffer itself has the new working directory.
My Quick Fix for this:
-- change_root_to_node will not change pwd for other buffers,
-- so i set it in this function
local api = require("nvim-tree.api")
vim.keymap.set("n", "<C-]>", function()
local node = api.tree.get_node_under_cursor()
api.tree.change_root_to_node()
vim.api.nvim_set_current_dir(node.absolute_path)
end, opts("CD"))
Neovim version
NVIM v0.9.1
Build type: Release
LuaJIT 2.1.0-beta3
Operating system and version
Linux 6.3.12-1-MANJARO
nvim-tree version
Clean room replication
just invoke the funktion, then use
:pwd
in Nvim-tree Buffer vs in other buffersSteps to reproduce
just invoke the funktion, then use
:pwd
in Nvim-tree Buffer vs in other buffers
Expected behavior
No response
Actual behavior
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working