From: Bram Moolenaar Date: Sat, 4 Jun 2016 20:36:17 +0000 (+0200) Subject: patch 7.4.1901 X-Git-Tag: v7.4.1901 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=762f1754370a1278167c8cba6c047ef319fc099c;p=vim patch 7.4.1901 Problem: Win32: the "Disabled" menu items would appear enabled. Solution: Use submenu_id if there is a parent. (Shane Harper, closes #834) --- diff --git a/src/gui_w32.c b/src/gui_w32.c index d506f000d..f6601dff7 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -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))) diff --git a/src/version.c b/src/version.c index adbf0edd4..4226b863d 100644 --- a/src/version.c +++ b/src/version.c @@ -753,6 +753,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1901, /**/ 1900, /**/