comparison src/gui_motif.c @ 22329:858d7ceb1135 v8.2.1713

patch 8.2.1713: Motif GUI: crash when setting menu colors Commit: https://github.com/vim/vim/commit/7795bfea6d30c85f2c05d986a0cfe4019df4d74d Author: Bram Moolenaar <Bram@vim.org> Date: Sun Sep 20 19:57:15 2020 +0200 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 https://github.com/vim/vim/issues/6989, closes #5948)
author Bram Moolenaar <Bram@vim.org>
date Sun, 20 Sep 2020 20:01:05 +0200
parents fcccc29bd386
children 2ccc3e68b617
comparison
equal deleted inserted replaced
22328:75ff30a78189 22329:858d7ceb1135
914 # if (XmVersion <= 1002) 914 # if (XmVersion <= 1002)
915 if (mouse_model_popup()) 915 if (mouse_model_popup())
916 # endif 916 # endif
917 { 917 {
918 if (gui.menu_bg_pixel != INVALCOLOR) 918 if (gui.menu_bg_pixel != INVALCOLOR)
919 {
919 XtSetArg(arg[0], XmNbackground, gui.menu_bg_pixel); n++; 920 XtSetArg(arg[0], XmNbackground, gui.menu_bg_pixel); n++;
921 }
920 if (gui.menu_fg_pixel != INVALCOLOR) 922 if (gui.menu_fg_pixel != INVALCOLOR)
923 {
921 XtSetArg(arg[1], XmNforeground, gui.menu_fg_pixel); n++; 924 XtSetArg(arg[1], XmNforeground, gui.menu_fg_pixel); n++;
925 }
922 menu->submenu_id = XmCreatePopupMenu(textArea, "contextMenu", 926 menu->submenu_id = XmCreatePopupMenu(textArea, "contextMenu",
923 arg, n); 927 arg, n);
924 menu->id = (Widget)0; 928 menu->id = (Widget)0;
925 } 929 }
926 return; 930 return;