Closed alex-courtis closed 1 year ago
Discovered while investigating #1998
Find occurs twice when with_open
is set:
find_file
falseupdate_focused_file.enable
Cannot replicate the find behaviour on window enter; perhaps I was using tree.open instead.
This isn't such a big problem following #2010 as the find will no longer refresh.
This would be a good time to add the api open/toggle options to find_file and clean up all the find file codepaths.
Will be resolved by #2011
Description
Find file is invoked when entering the nvim-tree buffer. This is unnecessary.
:NvimTreeFindFile
will result in two filesystem/git refreshes.Neovim version
Operating system and version
Linux 6.1.11-arch1-1
nvim-tree version
git log --format='%h' -n 1
Minimal config
Steps to reproduce
Enable profiling
Open tree.
Open a file.
Enter tree window: unnecessary refresh occurs
Enter file window,
:NvimTreeFindFile
: two refreshes occurExpected behavior
No response
Actual behavior
No response