summaryrefslogtreecommitdiff
path: root/src/normal.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-09-05 16:53:21 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-05 16:53:21 +0100
commitddf7dba96e05a41c7a228b153146237e0a21b146 (patch)
treeb5865b60ab795b541a902b2be3c39c0df353ca37 /src/normal.c
parentb1f471ee20b0fa783ecd6e29aa69067e6c821376 (diff)
downloadvim-git-9.0.0387.tar.gz
patch 9.0.0387: repeat <ScriptCmd> mapping doesn't use right script contextv9.0.0387
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)
Diffstat (limited to 'src/normal.c')
-rw-r--r--src/normal.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/normal.c b/src/normal.c
index fb2bced04..8351685d1 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -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('"');