0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.2005: redoing a mapping with <Cmd> doesn't work properly

Problem:    Redoing a mapping with <Cmd> doesn't work properly.
Solution:   Fill the redo buffer.  Use "<SNR>" instead of a key code.
            (closes #7282)
This commit is contained in:
Bram Moolenaar
2020-11-18 11:34:37 +01:00
parent b3a01946b3
commit c77534c303
4 changed files with 43 additions and 8 deletions

View File

@@ -3465,8 +3465,9 @@ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
if ((redo_yank || oap->op_type != OP_YANK)
&& ((!VIsual_active || oap->motion_force)
// Also redo Operator-pending Visual mode mappings
|| (VIsual_active && cap->cmdchar == ':'
&& oap->op_type != OP_COLON))
|| (VIsual_active
&& (cap->cmdchar == ':' || cap->cmdchar == K_COMMAND)
&& oap->op_type != OP_COLON))
&& cap->cmdchar != 'D'
#ifdef FEAT_FOLDING
&& oap->op_type != OP_FOLD
@@ -3688,7 +3689,7 @@ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
get_op_char(oap->op_type),
get_extra_op_char(oap->op_type),
oap->motion_force, cap->cmdchar, cap->nchar);
else if (cap->cmdchar != ':')
else if (cap->cmdchar != ':' && cap->cmdchar != K_COMMAND)
{
int nchar = oap->op_type == OP_REPLACE ? cap->nchar : NUL;