mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.0.0678: closing a window does not trigger resizing
Problem: When 'equalalways' is set and closing a window in a separate frame, not all window sizes are adjusted. (Glacambre) Solution: Resize all windows if the new current window is not in the same frame as the closed window. (closes #1707)
This commit is contained in:
@@ -2282,6 +2282,7 @@ win_close(win_T *win, int free_buf)
|
||||
int dir;
|
||||
int help_window = FALSE;
|
||||
tabpage_T *prev_curtab = curtab;
|
||||
frame_T *win_frame = win->w_frame;
|
||||
|
||||
if (last_window())
|
||||
{
|
||||
@@ -2459,7 +2460,10 @@ win_close(win_T *win, int free_buf)
|
||||
check_cursor();
|
||||
}
|
||||
if (p_ea && (*p_ead == 'b' || *p_ead == dir))
|
||||
win_equal(curwin, TRUE, dir);
|
||||
/* If the frame of the closed window contains the new current window,
|
||||
* only resize that frame. Otherwise resize all windows. */
|
||||
win_equal(curwin,
|
||||
curwin->w_frame->fr_parent == win_frame->fr_parent, dir);
|
||||
else
|
||||
win_comp_pos();
|
||||
if (close_curwin)
|
||||
|
Reference in New Issue
Block a user