-
Notifications
You must be signed in to change notification settings - Fork 249
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
Window behavior with vertical split #476
Comments
This is the second time someone has requested this and I think it makes sense. I'm sure there are a thousand edge cases though so it will probably be a mess which needs to be optional and off by default. @MunifTanjim is this something that you would want to handle within Nui?
What seems the most logical to me is to return the focus to the last visited window. That happens to be the same thing in your scenario, but if the sidebar is open for a long time there can be many window changes in between and it might not make sense to go back to the original window at that point. Going back to the last visited window would always be a predictable behavior. |
It's not just two splits side by side, it can be a complex layout of splits, e.g.
I don't think Nui should change sizes of splits not managed by Nui.
I think the better thing would be to fire an event when neo-tree closes, and user can run |
Should only do it if the cursor was on neo-tree window when it was closed. If the cursor was on another window when it closes, do nothing. |
Oh yeah, that would be a mess. It would be complicated to figure out the amount that each window should be reduced in that case. There could also be situations where some of the windows should be resized but not all of them. I think this is looking like too buggy a feature to add. Perhaps a better thing would be for each user to just create their own function to adjust window sizes as they wish.
This might be a better solution... I can add all of these:
That should be enough to handle this situation, and open up the possibilities of other customizations. A simple solution using the above events would be to just |
These look like great solutions! Looking forward. |
This is complete, and here is the recipe in the Wiki: https://github.com/nvim-neo-tree/neo-tree.nvim/wiki/Recipes#equalize-window-sizes-on-neo-tree-open-and-close |
If I toggle Neotree in a tab with a vertical split, the following happens:
I think the following behaviors (in fact, default behaviors of nvim-tree.lua) would be better:
If these behaviors are already available from the configurations, it would be best if someone can show me how.
The text was updated successfully, but these errors were encountered: