feat: supports full view in multi-window mode - #2660
Merged
Merged
Conversation
Collaborator
|
This does not work with me(neovim 0.11.3 on macOS), please try below steps
And this also breaks
|
Merged
Collaborator
|
@yetone Please take a look. |
dtor
added a commit
to dtor/avante.nvim
that referenced
this pull request
Oct 10, 2025
Sidebar:toggle_code_window() attempts to handle case when there are multiple non-sidebar windows are present but there are several issues with it: - checking whether we are running in "full" mode by checking width of the code window is not reliable as it may be only partially hidden (i.e. if transitioning from 3 windows formed by :split :vsplit sequence and going back to original larger window in which case it's width will be 2) - it is not enough to only manipulate widths of windows, in vertical layout we need to reduce heights instead. - trying to collect window sizes and minimize them in one pass may result in incorrect window sizes stored (they are changing as we are minimizing other ones) - table containing old window sizes is not reset and may grow with time Fix the issues by executing the toggle solely bases on the self.is_in_full_view flag, manipulate with both width and height of windows, and resetting stored sizes table and doing 2 passes over the window list when minimizing. Additionally do not try to collect window ids of sidebar containers and use it do filter them out later (since vim.tbl_contains() is implemented as a simple scan over elements in a table), but filter them out from the beginning using vim.iter(), filter(), and Sidebar:is_sidebar_container(). Fixes PR avante-corp#2660
dtor
added a commit
to dtor/avante.nvim
that referenced
this pull request
Oct 11, 2025
Sidebar:toggle_code_window() attempts to handle case when there are multiple non-sidebar windows are present but there are several issues with it: - checking whether we are running in "full" mode by checking width of the code window is not reliable as it may be only partially hidden (i.e. if transitioning from 3 windows formed by :split :vsplit sequence and going back to original larger window in which case it's width will be 2) - trying to collect window sizes and minimize them in one pass may result in incorrect window sizes stored (they are changing as we are minimizing other ones) - trying to minimize non-sidebar windows one by one causes unpredictable results when there are many windows - table containing old window sizes is not reset and may grow with time Fix the issues by executing the toggle solely bases on the self.is_in_full_view flag, properly reset it when resettign the sidebar, store and subsequently restore both width and height of windows, and instead of minimizing non-sidebar windows maximize the sidebar's "result" container that causes everything else to become minimized. Additionally do not try to collect window ids of sidebar containers and use it do filter them out later (since vim.tbl_contains() is implemented as a simple scan over elements in a table), but filter them out from the beginning using vim.iter(), filter(), and Sidebar:is_sidebar_container(). Unfortunately this still may result in some weird window placement and sizing issues as we are actively fighting neovim's internal algorithms of automatic window resizing. Fixes PR avante-corp#2660
gub-7
pushed a commit
to gub-7/avante.nvim
that referenced
this pull request
Mar 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.