0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 7.4.807

Problem:    After CTRL-V CTRL-A mode isn't updated. (Hirohito Higashi)
Solution:   Clear the command line or update the displayed command.
This commit is contained in:
Bram Moolenaar
2015-08-04 19:18:52 +02:00
parent cc218ab3ca
commit 0bbcb5c8ef
2 changed files with 22 additions and 13 deletions

View File

@@ -48,6 +48,7 @@ static int checkclearopq __ARGS((oparg_T *oap));
static void clearop __ARGS((oparg_T *oap)); static void clearop __ARGS((oparg_T *oap));
static void clearopbeep __ARGS((oparg_T *oap)); static void clearopbeep __ARGS((oparg_T *oap));
static void unshift_special __ARGS((cmdarg_T *cap)); static void unshift_special __ARGS((cmdarg_T *cap));
static void may_clear_cmdline __ARGS((void));
#ifdef FEAT_CMDL_INFO #ifdef FEAT_CMDL_INFO
static void del_from_showcmd __ARGS((int)); static void del_from_showcmd __ARGS((int));
#endif #endif
@@ -1752,12 +1753,7 @@ do_pending_operator(cap, old_col, gui_yank)
setmouse(); setmouse();
mouse_dragging = 0; mouse_dragging = 0;
#endif #endif
if (mode_displayed) may_clear_cmdline();
clear_cmdline = TRUE; /* unshow visual mode later */
#ifdef FEAT_CMDL_INFO
else
clear_showcmd();
#endif
if ((oap->op_type == OP_YANK if ((oap->op_type == OP_YANK
|| oap->op_type == OP_COLON || oap->op_type == OP_COLON
|| oap->op_type == OP_FUNCTION || oap->op_type == OP_FUNCTION
@@ -3312,13 +3308,7 @@ end_visual_mode()
if (!virtual_active()) if (!virtual_active())
curwin->w_cursor.coladd = 0; curwin->w_cursor.coladd = 0;
#endif #endif
may_clear_cmdline();
if (mode_displayed)
clear_cmdline = TRUE; /* unshow visual mode later */
#ifdef FEAT_CMDL_INFO
else
clear_showcmd();
#endif
adjust_cursor_eol(); adjust_cursor_eol();
} }
@@ -3763,6 +3753,21 @@ unshift_special(cap)
cap->cmdchar = simplify_key(cap->cmdchar, &mod_mask); cap->cmdchar = simplify_key(cap->cmdchar, &mod_mask);
} }
/*
* If the mode is currently displayed clear the command line or update the
* command displayed.
*/
static void
may_clear_cmdline()
{
if (mode_displayed)
clear_cmdline = TRUE; /* unshow visual mode later */
#ifdef FEAT_CMDL_INFO
else
clear_showcmd();
#endif
}
#if defined(FEAT_CMDL_INFO) || defined(PROTO) #if defined(FEAT_CMDL_INFO) || defined(PROTO)
/* /*
* Routines for displaying a partly typed command * Routines for displaying a partly typed command
@@ -4240,6 +4245,7 @@ nv_addsub(cap)
cmdarg_T *cap; cmdarg_T *cap;
{ {
int visual = VIsual_active; int visual = VIsual_active;
if (cap->oap->op_type == OP_NOP if (cap->oap->op_type == OP_NOP
&& do_addsub((int)cap->cmdchar, cap->count1, cap->arg) == OK) && do_addsub((int)cap->cmdchar, cap->count1, cap->arg) == OK)
{ {
@@ -4259,6 +4265,7 @@ nv_addsub(cap)
{ {
VIsual_active = FALSE; VIsual_active = FALSE;
redo_VIsual_busy = FALSE; redo_VIsual_busy = FALSE;
may_clear_cmdline();
redraw_later(INVERTED); redraw_later(INVERTED);
} }
} }

View File

@@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
807,
/**/ /**/
806, 806,
/**/ /**/