Skip to content

Commit 9e2fa4b

Browse files
gmntrollbrammool
authored andcommitted
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 #8728)
1 parent e525bdd commit 9e2fa4b

2 files changed

Lines changed: 6 additions & 23 deletions

File tree

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,8 @@ static char *(features[]) =
755755

756756
static int included_patches[] =
757757
{ /* Add new patch number below this line */
758+
/**/
759+
3313,
758760
/**/
759761
3312,
760762
/**/

src/window.c

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,24 +1684,10 @@ win_exchange(long Prenum)
16841684
curwin->w_vsep_width = wp->w_vsep_width;
16851685
wp->w_vsep_width = temp;
16861686

1687-
// If the windows are not in the same frame, exchange the sizes to avoid
1688-
// messing up the window layout. Otherwise fix the frame sizes.
1689-
if (curwin->w_frame->fr_parent != wp->w_frame->fr_parent)
1690-
{
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-
}
1687+
frame_fix_height(curwin);
1688+
frame_fix_height(wp);
1689+
frame_fix_width(curwin);
1690+
frame_fix_width(wp);
17051691

17061692
(void)win_comp_pos(); // recompute window positions
17071693

@@ -5275,12 +5261,7 @@ frame_remove(frame_T *frp)
52755261
if (frp->fr_prev != NULL)
52765262
frp->fr_prev->fr_next = frp->fr_next;
52775263
else
5278-
{
52795264
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-
}
52845265
if (frp->fr_next != NULL)
52855266
frp->fr_next->fr_prev = frp->fr_prev;
52865267
}

0 commit comments

Comments
 (0)