Skip to content

Commit 76bdd7c

Browse files
committed
updated for version 7.4.681
Problem: MS-Windows: When Vim is minimized the window height is computed incorrectly. Solution: When minimized use the previously computed size. (Ingo Karkat)
1 parent 0a77681 commit 76bdd7c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/gui_w32.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,14 @@ gui_mswin_get_menu_height(
598598

599599
if (num == 0)
600600
menu_height = 0;
601+
else if (IsMinimized(s_hwnd))
602+
{
603+
/* The height of the menu cannot be determined while the window is
604+
* minimized. Take the previous height if the menu is changed in that
605+
* state, to avoid that Vim's vertical window size accidentally
606+
* increases due to the unaccounted-for menu height. */
607+
menu_height = old_menu_height == -1 ? 0 : old_menu_height;
608+
}
601609
else
602610
{
603611
if (is_winnt_3()) /* for NT 3.xx */
@@ -644,9 +652,9 @@ gui_mswin_get_menu_height(
644652

645653
if (fix_window && menu_height != old_menu_height)
646654
{
647-
old_menu_height = menu_height;
648655
gui_set_shellsize(FALSE, FALSE, RESIZE_VERT);
649656
}
657+
old_menu_height = menu_height;
650658

651659
return menu_height;
652660
}

src/version.c

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

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
681,
744746
/**/
745747
680,
746748
/**/

0 commit comments

Comments
 (0)