-
-
Notifications
You must be signed in to change notification settings - Fork 619
fix(#1815): don't schedule find file calls #1820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(#1815): don't schedule find file calls #1820
Conversation
Functionally it works, thanks for the fix! But not exporting Should equivalent be: require('nvim-tree').open()
require('nvim-tree.api').tree.find_file(bufname) ? |
Ah of course, I wondered why it was public. There's I'm game to remove it if you are ;) |
Quick BufEnter events cause multiple find_file calls, which is a performance hit as it results in an FS and git refresh. Debounced all events with single context |
Absolutely, remove it. Even if it was not intended to be used I think that removal warrants notifying users? It will be breaking change for sure. |
|
…ile with 15ms default (#1828) * Revert "Revert "fix(#1815): don't schedule find_file calls, debounce update_focused_file with 15ms default (#1820)"" This reverts commit a8d26bb. * fix(#1723): find_file for externally created new file results in folder unable to be opened * fix(#1723): find_file for externally created new file results in folder unable to be opened
fixes #1815
Optimistic PR for dogfooding.
Both
https://github.com/nvim-tree/nvim-tree.lua/pull/1820/files#diff-d2d7203cea884a09928ac1574693d436d6e3db28e62daabfa53f5f9f7740f51aR157 and
nvim-tree.lua/lua/nvim-tree/actions/finders/find-file.lua
Line 21 in b17358f
protect against any finding of buffers that are not real files i.e. not nvim-tree itself.