summaryrefslogtreecommitdiff
path: root/src/menu.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-03-20 21:59:49 +0000
committerBram Moolenaar <Bram@vim.org>2006-03-20 21:59:49 +0000
commitb3656edcb96bd36277db157baec80cb5e7a6f534 (patch)
tree196eed24afb857886081bbdc690e385715c59cb9 /src/menu.c
parent9b2200acd6bd572eea00ea89eeb3b2c0764c8942 (diff)
downloadvim-git-b3656edcb96bd36277db157baec80cb5e7a6f534.tar.gz
updated for version 7.0230v7.0230
Diffstat (limited to 'src/menu.c')
-rw-r--r--src/menu.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/menu.c b/src/menu.c
index e30ac18e8..8748740a5 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -739,6 +739,7 @@ add_menu_path(menu_path, menuarg, pri_tab, call_data
switch (1 << i)
{
case MENU_VISUAL_MODE:
+ case MENU_SELECT_MODE:
case MENU_OP_PENDING_MODE:
case MENU_CMDLINE_MODE:
c = Ctrl_C;
@@ -1464,8 +1465,14 @@ get_menu_cmd_modes(cmd, forceit, noremap, unmenu)
switch (*cmd++)
{
case 'v': /* vmenu, vunmenu, vnoremenu */
+ modes = MENU_VISUAL_MODE | MENU_SELECT_MODE;
+ break;
+ case 'x': /* xmenu, xunmenu, xnoremenu */
modes = MENU_VISUAL_MODE;
break;
+ case 's': /* smenu, sunmenu, snoremenu */
+ modes = MENU_SELECT_MODE;
+ break;
case 'o': /* omenu */
modes = MENU_OP_PENDING_MODE;
break;
@@ -1480,7 +1487,8 @@ get_menu_cmd_modes(cmd, forceit, noremap, unmenu)
break;
case 'a': /* amenu */
modes = MENU_INSERT_MODE | MENU_CMDLINE_MODE | MENU_NORMAL_MODE
- | MENU_VISUAL_MODE | MENU_OP_PENDING_MODE;
+ | MENU_VISUAL_MODE | MENU_SELECT_MODE
+ | MENU_OP_PENDING_MODE;
break;
case 'n':
if (*cmd != 'o') /* nmenu, not noremenu */
@@ -1494,7 +1502,7 @@ get_menu_cmd_modes(cmd, forceit, noremap, unmenu)
if (forceit) /* menu!! */
modes = MENU_INSERT_MODE | MENU_CMDLINE_MODE;
else /* menu */
- modes = MENU_NORMAL_MODE | MENU_VISUAL_MODE
+ modes = MENU_NORMAL_MODE | MENU_VISUAL_MODE | MENU_SELECT_MODE
| MENU_OP_PENDING_MODE;
}
@@ -1545,7 +1553,12 @@ get_menu_index(menu, state)
idx = MENU_INDEX_CMDLINE;
#ifdef FEAT_VISUAL
else if (VIsual_active)
- idx = MENU_INDEX_VISUAL;
+ {
+ if (VIsual_select)
+ idx = MENU_INDEX_SELECT;
+ else
+ idx = MENU_INDEX_VISUAL;
+ }
#endif
else if (state == HITRETURN || state == ASKMORE)
idx = MENU_INDEX_CMDLINE;
@@ -1712,7 +1725,11 @@ get_menu_mode()
{
#ifdef FEAT_VISUAL
if (VIsual_active)
+ {
+ if (VIsual_select)
+ return MENU_INDEX_SELECT;
return MENU_INDEX_VISUAL;
+ }
#endif
if (State & INSERT)
return MENU_INDEX_INSERT;