mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 07:16:09 +00:00
vim-patch:8.2.0580: window size wrong if 'ea' is off and 'splitright' is on
Problem: Window size wrong if 'ea' is off and 'splitright' is on and
splitting then closing a window.
Solution: Put abandoned window space in the right place. (Mark Waggoner)
edd327cc07
This commit is contained in:
@@ -3079,9 +3079,21 @@ static frame_T *win_altframe(win_T *win, tabpage_T *tp)
|
||||
return frp->fr_prev;
|
||||
}
|
||||
|
||||
// By default the next window will get the space that was abandoned by this
|
||||
// window
|
||||
frame_T *target_fr = frp->fr_next;
|
||||
frame_T *other_fr = frp->fr_prev;
|
||||
if (p_spr || p_sb) {
|
||||
|
||||
// If this is part of a column of windows and 'splitbelow' is true then the
|
||||
// previous window will get the space.
|
||||
if (frp->fr_parent != NULL && frp->fr_parent->fr_layout == FR_COL && p_sb) {
|
||||
target_fr = frp->fr_prev;
|
||||
other_fr = frp->fr_next;
|
||||
}
|
||||
|
||||
// If this is part of a row of windows, and 'splitright' is true then the
|
||||
// previous window will get the space.
|
||||
if (frp->fr_parent != NULL && frp->fr_parent->fr_layout == FR_ROW && p_spr) {
|
||||
target_fr = frp->fr_prev;
|
||||
other_fr = frp->fr_next;
|
||||
}
|
||||
|
Reference in New Issue
Block a user