summaryrefslogtreecommitdiff
path: root/src/gui_motif.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-20 19:57:15 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-20 19:57:15 +0200
commit7795bfea6d30c85f2c05d986a0cfe4019df4d74d (patch)
tree15fe1863e42510fcec713d327fd304030a7400f3 /src/gui_motif.c
parent1d59aa1fdfb191d9872ff87eb94652acd374b293 (diff)
downloadvim-git-7795bfea6d30c85f2c05d986a0cfe4019df4d74d.tar.gz
patch 8.2.1713: Motif GUI: crash when setting menu colorsv8.2.1713
Problem: Motif GUI: crash when setting menu colors. (Andrzej Bylicki) Solution: Add {} to make "n" incremented correctly. (closes #6989, closes #5948)
Diffstat (limited to 'src/gui_motif.c')
-rw-r--r--src/gui_motif.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui_motif.c b/src/gui_motif.c
index 9d13b57b4..57d50b0ee 100644
--- a/src/gui_motif.c
+++ b/src/gui_motif.c
@@ -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;