]> granicus.if.org Git - vim/commitdiff
updated for version 7.2.431 v7.2.431
authorBram Moolenaar <Bram@vim.org>
Fri, 14 May 2010 19:19:23 +0000 (21:19 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 14 May 2010 19:19:23 +0000 (21:19 +0200)
Problem:    ":amenu" moves the cursor when in Insert mode.
Solution:   Use CTRL-\ CTRL-O instead of CTRL-O. (Christian Brabandt)

src/menu.c
src/version.c

index 41bebbf32ac4928c556d973c8bcf9e143156cb99..a80239eb54a67ec7afd7cb805c2d9f2c1fb02d96 100644 (file)
@@ -490,6 +490,7 @@ add_menu_path(menu_path, menuarg, pri_tab, call_data
     char_u     *next_name;
     int                i;
     int                c;
+    int                d;
 #ifdef FEAT_GUI
     int                idx;
     int                new_idx;
@@ -746,6 +747,7 @@ add_menu_path(menu_path, menuarg, pri_tab, call_data
                 * Don't do this if adding a tearbar (addtearoff == FALSE).
                 * Don't do this for "<Nop>". */
                c = 0;
+               d = 0;
                if (amenu && call_data != NULL && *call_data != NUL
 #ifdef FEAT_GUI_W32
                       && addtearoff
@@ -761,18 +763,25 @@ add_menu_path(menu_path, menuarg, pri_tab, call_data
                            c = Ctrl_C;
                            break;
                        case MENU_INSERT_MODE:
-                           c = Ctrl_O;
+                           c = Ctrl_BSL;
+                           d = Ctrl_O;
                            break;
                    }
                }
 
-               if (c)
+               if (c != 0)
                {
-                   menu->strings[i] = alloc((unsigned)(STRLEN(call_data) + 4));
+                   menu->strings[i] = alloc((unsigned)(STRLEN(call_data) + ));
                    if (menu->strings[i] != NULL)
                    {
                        menu->strings[i][0] = c;
-                       STRCPY(menu->strings[i] + 1, call_data);
+                       if (d == 0)
+                           STRCPY(menu->strings[i] + 1, call_data);
+                       else
+                       {
+                           menu->strings[i][1] = d;
+                           STRCPY(menu->strings[i] + 2, call_data);
+                       }
                        if (c == Ctrl_C)
                        {
                            int     len = (int)STRLEN(menu->strings[i]);
index 111adb546c33376bf2208ffe772da36970f6cc13..f00ff745a59be1b5af9ee7495dc6fc61fc43d447 100644 (file)
@@ -681,6 +681,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    431,
 /**/
     430,
 /**/