Skip to content

fix: reuse windows and buffers when possible, prevents flashing when switching #1011

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

Merged

Conversation

cseickel
Copy link
Contributor

@cseickel cseickel commented Jun 24, 2023

fixes #713

This adds logic to reuse Neotree windows between sources instead of always closing the window when opening a new source. It also improves upon the concept of reusing the buffer when possible instead of recreating it from scratch each time. These are primarily optimizations for quickly switching between sources when they are shown as sidebars.

@cseickel
Copy link
Contributor Author

@nhat-vo I think this fixes the flashing window problem when switching sources.

@andrevmatos
Copy link

I think this may have broken Neotree on different tabs.
Now they aren't independent anymore, and if I leave a tree open on tab 1, switch to tab 2 and try to open Neotree from there, it'll focus tab 1 and its Neotree, instead of opening a new, independent one in tab 2.

@nhat-vo
Copy link
Collaborator

nhat-vo commented Jul 2, 2023

@cseickel This looks great, thanks a lot! Sorry, I haven't got much time in the last few weeks. I will have a look at the issue with the different tabs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants