summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgmntroll <gmantrolllol@gmail.com>2021-08-07 22:35:52 +0200
committerBram Moolenaar <Bram@vim.org>2021-08-07 22:35:52 +0200
commit9e2fa4bb9eb40a78a1ae1f67a4064651b5ce0aac (patch)
treef8f62e2eae314dfd1c6348bb11200c982f2a78f5
parente525bdda3aa29f0ffcb18d8d16903ebafc2b5881 (diff)
downloadvim-git-9e2fa4bb9eb40a78a1ae1f67a4064651b5ce0aac.tar.gz
patch 8.2.3313: unused code in win_exchange() and frame_remove()v8.2.3313
Problem: Unused code in win_exchange() and frame_remove(). Solution: Remove the code. (closes #8728)
-rw-r--r--src/version.c2
-rw-r--r--src/window.c27
2 files changed, 6 insertions, 23 deletions
diff --git a/src/version.c b/src/version.c
index a6e2f1ef0..db75af720 100644
--- a/src/version.c
+++ b/src/version.c
@@ -756,6 +756,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3313,
+/**/
3312,
/**/
3311,
diff --git a/src/window.c b/src/window.c
index 7dcb8ed5b..1cc85497d 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1684,24 +1684,10 @@ win_exchange(long Prenum)
curwin->w_vsep_width = wp->w_vsep_width;
wp->w_vsep_width = temp;
- // If the windows are not in the same frame, exchange the sizes to avoid
- // messing up the window layout. Otherwise fix the frame sizes.
- if (curwin->w_frame->fr_parent != wp->w_frame->fr_parent)
- {
- temp = curwin->w_height;
- curwin->w_height = wp->w_height;
- wp->w_height = temp;
- temp = curwin->w_width;
- curwin->w_width = wp->w_width;
- wp->w_width = temp;
- }
- else
- {
- frame_fix_height(curwin);
- frame_fix_height(wp);
- frame_fix_width(curwin);
- frame_fix_width(wp);
- }
+ frame_fix_height(curwin);
+ frame_fix_height(wp);
+ frame_fix_width(curwin);
+ frame_fix_width(wp);
(void)win_comp_pos(); // recompute window positions
@@ -5275,12 +5261,7 @@ frame_remove(frame_T *frp)
if (frp->fr_prev != NULL)
frp->fr_prev->fr_next = frp->fr_next;
else
- {
frp->fr_parent->fr_child = frp->fr_next;
- // special case: topframe->fr_child == frp
- if (topframe->fr_child == frp)
- topframe->fr_child = frp->fr_next;
- }
if (frp->fr_next != NULL)
frp->fr_next->fr_prev = frp->fr_prev;
}