patch 7.4.1915 v7.4.1915
authorBram Moolenaar <Bram@vim.org>
Fri, 10 Jun 2016 19:52:42 +0000 (21:52 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 10 Jun 2016 19:52:42 +0000 (21:52 +0200)
Problem:    The effect of the PopupMenu autocommand isn't directly visible.
Solution:   Call gui_update_menus() before displaying the popup menu. (Shane
            Harper, closs #855)

src/menu.c
src/version.c

index b6f8ce47abfe43da0750d0e7d265a8b58887177c..2802de33d72467dd420cfe8c541cdebf6a3253f6 100644 (file)
@@ -1970,7 +1970,12 @@ gui_show_popupmenu(void)
 
     /* Only show a popup when it is defined and has entries */
     if (menu != NULL && menu->children != NULL)
+    {
+       /* Update the menus now, in case the MenuPopup autocommand did
+        * anything. */
+       gui_update_menus(0);
        gui_mch_show_popupmenu(menu);
+    }
 }
 #endif /* FEAT_GUI */
 
index 4a2d5378a7902c576b0b450c55c8c16f45f33f2c..1acd1e4cb6d08b7241af515dd9c39dbfc36c8007 100644 (file)
@@ -753,6 +753,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1915,
 /**/
     1914,
 /**/