-
Notifications
You must be signed in to change notification settings - Fork 256
fix: auto_expand_width gets caught in infinite loop and hangs neovim (#624) #627
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: auto_expand_width gets caught in infinite loop and hangs neovim (#624) #627
Conversation
Codecov Report
@@ Coverage Diff @@
## main #627 +/- ##
==========================================
+ Coverage 50.45% 50.49% +0.04%
==========================================
Files 47 47
Lines 6099 6103 +4
==========================================
+ Hits 3077 3082 +5
+ Misses 3022 3021 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great for me!
Actually, this is still not quite right. I just got into a situation where I could not scroll vertically in a neo-tree window because every movement caused a re-render and put me back to the top of the window. I disabled the feature in my own config for now. I think this can use some more work. |
@cseickel Thanks for testting. Could you give me a minimal way to reproduce your issue? I really cannot have the same behavior with my setup and I have no issues whatsoever. And could you test what happens when The rendering should only happen on what was already implementing before adding this feature or when the rendering text length exceeds the width of the window. Thanks in advance. |
@pysan3 I think this is the core issue: neo-tree.nvim/lua/neo-tree/ui/renderer.lua Line 946 in 4c3d9d5
That creates an infinite loop of renders whenever the auto_expand code is actually triggered. I ended up rewriting the logic to be more direct and ensure there is only one extra render. I'm also making it something that can be reused for position = EDIT: now #629 is done and merged. We should be good now. |
@cseickel Thank you so so much!! Your rewrite works like a charm! |
Should fix #624.
For more info and discussion, please read the above issue.