# HG changeset patch # User Bram Moolenaar # Date 1273864763 -7200 # Node ID 4c8008ab94d8da38529991004a56e65547faed15 # Parent 99b225e0dbc1989ecae75200aaf0e5329e6bedac updated for version 7.2.431 Problem: ":amenu" moves the cursor when in Insert mode. Solution: Use CTRL-\ CTRL-O instead of CTRL-O. (Christian Brabandt) diff --git a/src/menu.c b/src/menu.c --- a/src/menu.c +++ b/src/menu.c @@ -490,6 +490,7 @@ add_menu_path(menu_path, menuarg, pri_ta 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_ta * Don't do this if adding a tearbar (addtearoff == FALSE). * Don't do this for "". */ 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_ta 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) + 5 )); 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]); diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -682,6 +682,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 431, +/**/ 430, /**/ 429,