0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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)
This commit is contained in:
Bram Moolenaar
2016-06-04 22:36:17 +02:00
parent 28b942a064
commit 762f175437
2 changed files with 4 additions and 4 deletions

View 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)))