Closed
Description
OS
Ubuntu 20.04.3 LTS (Focal Fossa)
Neovim version
0.7.0-dev
Nvim-tree version
ea92e7b
Describe the bug
Since 8a6c7ba, the working directory is no longer synced EVEN if I specify a directory when launching Neovim.
(dropped a few guesses of mine at the end of this issue)
To Reproduce
On Terminal:
$ cd ~/a # navigate into folder A
$ nvim ~/b # attempt to launch nvim on folder B
Inside Neovim:
:pwd
/home/guilhermerodz/a << Should be "b" not "a".
NOTE: This behaviour wasn't happening before this commit: 8a6c7ba.
Expected behavior
- When launching Neovim,
nvim-tree
should automatically set the current working directory if specified in the command line.
- MAIN GUESS: I know there are very recent refactors. I think this issue is related to
nvim-tree/explorer/init.lua
. TheExplorer.new(cwd)
method is called. A new Explorer instance is created, then thecwd
variable is set. But this logic causes Explorer's cwd to be unsynced with Neovim's current working directory, which remains unchanged. - A NOTE: I took some time to compare our updated version to an older version. In the current version, at
nvim-tree/actions/change-dir
, theM.fn
method stopped being called at startup.
Metadata
Metadata
Assignees
Labels
No labels