vim-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 vim/vim#7282)
c77534c303
This commit is contained in:
Björn Linse
2020-11-18 14:49:25 +01:00
parent 8c4648421a
commit 147917369e
3 changed files with 40 additions and 5 deletions

View File

@@ -4476,9 +4476,7 @@ char_u * getcmdkeycmd(int promptc, void *cookie, int indent, bool do_concat)
aborted = true;
} else if (IS_SPECIAL(c1)) {
if (c1 == K_SNR) {
ga_append(&line_ga, (char)K_SPECIAL);
ga_append(&line_ga, (char)KS_EXTRA);
ga_append(&line_ga, (char)KE_SNR);
ga_concat(&line_ga, (char_u *)"<SNR>");
} else {
EMSG2(e_cmdmap_key, get_special_key_name(c1, cmod));
aborted = true;