comparison src/window.c @ 25553:8b5dc14345ce v8.2.3313

patch 8.2.3313: unused code in win_exchange() and frame_remove() Commit: https://github.com/vim/vim/commit/9e2fa4bb9eb40a78a1ae1f67a4064651b5ce0aac Author: gmntroll <gmantrolllol@gmail.com> Date: Sat Aug 7 22:35:52 2021 +0200 patch 8.2.3313: unused code in win_exchange() and frame_remove() Problem: Unused code in win_exchange() and frame_remove(). Solution: Remove the code. (closes https://github.com/vim/vim/issues/8728)
author Bram Moolenaar <Bram@vim.org>
date Sat, 07 Aug 2021 22:45:02 +0200
parents 040a45d39570
children 0082503ff2ff
comparison
equal deleted inserted replaced
25552:4ecef4a5ea54 25553:8b5dc14345ce
1682 wp->w_status_height = temp; 1682 wp->w_status_height = temp;
1683 temp = curwin->w_vsep_width; 1683 temp = curwin->w_vsep_width;
1684 curwin->w_vsep_width = wp->w_vsep_width; 1684 curwin->w_vsep_width = wp->w_vsep_width;
1685 wp->w_vsep_width = temp; 1685 wp->w_vsep_width = temp;
1686 1686
1687 // If the windows are not in the same frame, exchange the sizes to avoid 1687 frame_fix_height(curwin);
1688 // messing up the window layout. Otherwise fix the frame sizes. 1688 frame_fix_height(wp);
1689 if (curwin->w_frame->fr_parent != wp->w_frame->fr_parent) 1689 frame_fix_width(curwin);
1690 { 1690 frame_fix_width(wp);
1691 temp = curwin->w_height;
1692 curwin->w_height = wp->w_height;
1693 wp->w_height = temp;
1694 temp = curwin->w_width;
1695 curwin->w_width = wp->w_width;
1696 wp->w_width = temp;
1697 }
1698 else
1699 {
1700 frame_fix_height(curwin);
1701 frame_fix_height(wp);
1702 frame_fix_width(curwin);
1703 frame_fix_width(wp);
1704 }
1705 1691
1706 (void)win_comp_pos(); // recompute window positions 1692 (void)win_comp_pos(); // recompute window positions
1707 1693
1708 win_enter(wp, TRUE); 1694 win_enter(wp, TRUE);
1709 redraw_all_later(NOT_VALID); 1695 redraw_all_later(NOT_VALID);
5273 frame_remove(frame_T *frp) 5259 frame_remove(frame_T *frp)
5274 { 5260 {
5275 if (frp->fr_prev != NULL) 5261 if (frp->fr_prev != NULL)
5276 frp->fr_prev->fr_next = frp->fr_next; 5262 frp->fr_prev->fr_next = frp->fr_next;
5277 else 5263 else
5278 {
5279 frp->fr_parent->fr_child = frp->fr_next; 5264 frp->fr_parent->fr_child = frp->fr_next;
5280 // special case: topframe->fr_child == frp
5281 if (topframe->fr_child == frp)
5282 topframe->fr_child = frp->fr_next;
5283 }
5284 if (frp->fr_next != NULL) 5265 if (frp->fr_next != NULL)
5285 frp->fr_next->fr_prev = frp->fr_prev; 5266 frp->fr_next->fr_prev = frp->fr_prev;
5286 } 5267 }
5287 5268
5288 /* 5269 /*