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

patch 9.0.0387: repeat <ScriptCmd> mapping doesn't use right script context

Problem:    repeating a <ScriptCmd> mapping does not use the right script
            context.
Solution:   When using a mapping put <SID>{sid}; in the redo buffer.
            (closes #11049)
This commit is contained in:
Bram Moolenaar
2022-09-05 16:53:21 +01:00
parent b1f471ee20
commit ddf7dba96e
6 changed files with 113 additions and 4 deletions

View File

@@ -1466,6 +1466,13 @@ prep_redo_num2(
int cmd5)
{
ResetRedobuff();
#ifdef FEAT_EVAL
// Put info about a mapping in the redo buffer, so that "." will use the
// same script context.
may_add_last_used_map_to_redobuff();
#endif
if (regname != 0) // yank from specified buffer
{
AppendCharToRedobuff('"');