]> granicus.if.org Git - vim/commitdiff
patch 7.4.1901 v7.4.1901
authorBram Moolenaar <Bram@vim.org>
Sat, 4 Jun 2016 20:36:17 +0000 (22:36 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 4 Jun 2016 20:36:17 +0000 (22:36 +0200)
Problem:    Win32: the "Disabled" menu items would appear enabled.
Solution:   Use submenu_id if there is a parent. (Shane Harper, closes #834)

src/gui_w32.c
src/version.c

index d506f000dc45bf2f7318dbabd4049c0d5947eb52..f6601dff7c154a7093b2f986caeb35161e5a3246 100644 (file)
@@ -7026,10 +7026,8 @@ gui_mch_menu_grey(
     }
     else
 #endif
-    if (grey)
-       EnableMenuItem(s_menuBar, menu->id, MF_BYCOMMAND | MF_GRAYED);
-    else
-       EnableMenuItem(s_menuBar, menu->id, MF_BYCOMMAND | MF_ENABLED);
+    (void)EnableMenuItem(menu->parent ? menu->parent->submenu_id : s_menuBar,
+                   menu->id, MF_BYCOMMAND | (grey ? MF_GRAYED : MF_ENABLED));
 
 #ifdef FEAT_TEAROFF
     if ((menu->parent != NULL) && (IsWindow(menu->parent->tearoff_handle)))
index adbf0edd41f0f8bcece2c6e007205a5a89091e85..4226b863d1f676464a9fd9ce4cf4624b55af617f 100644 (file)
@@ -753,6 +753,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1901,
 /**/
     1900,
 /**/