summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-09-18 20:31:41 +0200
committerBram Moolenaar <Bram@vim.org>2017-09-18 20:31:41 +0200
commitd326ad6e93604222c64bae51f47521fe9114d1ea (patch)
treeb266330c13d026404ae5d6582f3f4afa99688d31
parentf16c71b66927a28196b25a42795d083784ab1b9a (diff)
patch 8.0.1125: wrong window height when splitting window with window toolbarv8.0.1125
Problem: Wrong window height when splitting window with window toolbar. Solution: Add or subtract the window toolbar height.
-rw-r--r--src/version.c2
-rw-r--r--src/window.c30
2 files changed, 27 insertions, 5 deletions
diff --git a/src/version.c b/src/version.c
index 654c35d758..d24c8548cf 100644
--- a/src/version.c
+++ b/src/version.c
@@ -762,6 +762,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1125,
+/**/
1124,
/**/
1123,
diff --git a/src/window.c b/src/window.c
index be8e20ade9..370f749a8c 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1098,14 +1098,22 @@ win_split_ins(
{
/* set height and row of new window to full height */
wp->w_winrow = tabline_height();
- win_new_height(wp, curfrp->fr_height - (p_ls > 0));
+ win_new_height(wp, curfrp->fr_height - (p_ls > 0)
+#ifdef FEAT_MENU
+ - wp->w_winbar_height
+#endif
+ );
wp->w_status_height = (p_ls > 0);
}
else
{
/* height and row of new window is same as current window */
wp->w_winrow = oldwin->w_winrow;
- win_new_height(wp, oldwin->w_height);
+ win_new_height(wp, oldwin->w_height
+#ifdef FEAT_MENU
+ + oldwin->w_winbar_height
+#endif
+ );
wp->w_status_height = oldwin->w_status_height;
}
frp->fr_height = curfrp->fr_height;
@@ -1163,7 +1171,11 @@ win_split_ins(
win_new_height(wp, new_size);
if (flags & (WSP_TOP | WSP_BOT))
{
- int new_fr_height = curfrp->fr_height - new_size;
+ int new_fr_height = curfrp->fr_height - new_size
+#ifdef FEAT_MENU
+ + wp->w_winbar_height
+#endif
+ ;
if (!((flags & WSP_BOT) && p_ls == 0))
new_fr_height -= STATUS_HEIGHT;
@@ -2855,7 +2867,11 @@ frame_new_height(
{
/* Simple case: just one window. */
win_new_height(topfrp->fr_win,
- height - topfrp->fr_win->w_status_height);
+ height - topfrp->fr_win->w_status_height
+#ifdef FEAT_MENU
+ - topfrp->fr_win->w_winbar_height
+#endif
+ );
}
else if (topfrp->fr_layout == FR_ROW)
{
@@ -3201,7 +3217,11 @@ frame_fix_width(win_T *wp)
static void
frame_fix_height(win_T *wp)
{
- wp->w_frame->fr_height = wp->w_height + wp->w_status_height;
+ wp->w_frame->fr_height = wp->w_height + wp->w_status_height
+#ifdef FEAT_MENU
+ + wp->w_winbar_height
+#endif
+ ;
}
/*