-
Notifications
You must be signed in to change notification settings - Fork 210
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
Can the context scratch buffers be reused? #533
Comments
I believe this can be easily fixed when the context becomes empty. However, if you don't use the multiwindow option, the buffer number will increase every time you switch to another window. Although this can also be addressed, the implementation will be more complex. Anyway, I'll take a closer look at it in the near future. |
I believe before multiwindow was implemented we declared a single buffer and always reused it. So this in effect is another regression. |
Yes, this it true. I'll fix that. |
Thank you both for your time! |
Is it possible to reuse the scratch buffers created instead of destroying them when context is empty and creating new ones every time a context is going to be rendered?
This way buffer numbers don't increase dramatically and also avoids triggering other plugins reacting to buffers being created/destroyed.
I'm having a particular problem with vim-airline which I have traced back to this constant cycling of buffers that nvim-treesitter-context does. The issue feels like it should be fixed in airline, but at the same time would be nice to reuse scratch buffers at least to avoid buffer numbers increasing (I easily get into the 1000s after a few hours of coding)
The text was updated successfully, but these errors were encountered: