forked from aniani/vim
patch 8.2.1713: Motif GUI: crash when setting menu colors
Problem: Motif GUI: crash when setting menu colors. (Andrzej Bylicki) Solution: Add {} to make "n" incremented correctly. (closes #6989, closes #5948)
This commit is contained in:
@@ -916,9 +916,13 @@ gui_mch_add_menu(vimmenu_T *menu, int idx)
|
||||
# endif
|
||||
{
|
||||
if (gui.menu_bg_pixel != INVALCOLOR)
|
||||
{
|
||||
XtSetArg(arg[0], XmNbackground, gui.menu_bg_pixel); n++;
|
||||
}
|
||||
if (gui.menu_fg_pixel != INVALCOLOR)
|
||||
{
|
||||
XtSetArg(arg[1], XmNforeground, gui.menu_fg_pixel); n++;
|
||||
}
|
||||
menu->submenu_id = XmCreatePopupMenu(textArea, "contextMenu",
|
||||
arg, n);
|
||||
menu->id = (Widget)0;
|
||||
|
Reference in New Issue
Block a user