0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

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)
This commit is contained in:
Bram Moolenaar 2015-03-24 17:57:12 +01:00
parent 310f2d59b2
commit 71371b1579
2 changed files with 11 additions and 1 deletions

View File

@ -598,6 +598,14 @@ gui_mswin_get_menu_height(
if (num == 0)
menu_height = 0;
else if (IsMinimized(s_hwnd))
{
/* The height of the menu cannot be determined while the window is
* minimized. Take the previous height if the menu is changed in that
* state, to avoid that Vim's vertical window size accidentally
* increases due to the unaccounted-for menu height. */
menu_height = old_menu_height == -1 ? 0 : old_menu_height;
}
else
{
if (is_winnt_3()) /* for NT 3.xx */
@ -644,9 +652,9 @@ gui_mswin_get_menu_height(
if (fix_window && menu_height != old_menu_height)
{
old_menu_height = menu_height;
gui_set_shellsize(FALSE, FALSE, RESIZE_VERT);
}
old_menu_height = menu_height;
return menu_height;
}

View File

@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
681,
/**/
680,
/**/