diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-06-04 22:36:17 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-06-04 22:36:17 +0200 |
commit | 762f1754370a1278167c8cba6c047ef319fc099c (patch) | |
tree | 2a2101b7de7f3a094a14fae4b76d7ea5ee7a8f0a /src/gui_w32.c | |
parent | 28b942a064dd486cc241894b625ab72f5a5c6d1b (diff) | |
download | vim-git-762f1754370a1278167c8cba6c047ef319fc099c.tar.gz |
patch 7.4.1901v7.4.1901
Problem: Win32: the "Disabled" menu items would appear enabled.
Solution: Use submenu_id if there is a parent. (Shane Harper, closes #834)
Diffstat (limited to 'src/gui_w32.c')
-rw-r--r-- | src/gui_w32.c | 6 |
1 files changed, 2 insertions, 4 deletions
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))) |