]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.681 v7.4.681
authorBram Moolenaar <Bram@vim.org>
Tue, 24 Mar 2015 16:57:12 +0000 (17:57 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 24 Mar 2015 16:57:12 +0000 (17:57 +0100)
Problem:    MS-Windows: When Vim is minimized the window height is computed
            incorrectly.
Solution:   When minimized use the previously computed size. (Ingo Karkat)

src/gui_w32.c
src/version.c

index b81a74df963df2f45749f885824b33c879a1e3cf..4fbf70edccb25083562215d3951464499436f57c 100644 (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;
 }
index b08c010fa38051461786d707c8405e1cec41ce73..7ef36073978b18188381efb55daaf3ba640c8209 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    681,
 /**/
     680,
 /**/