comparison src/normal.c @ 30102:539fb427124d v9.0.0387

patch 9.0.0387: repeat <ScriptCmd> mapping doesn't use right script context Commit: https://github.com/vim/vim/commit/ddf7dba96e05a41c7a228b153146237e0a21b146 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Sep 5 16:53:21 2022 +0100 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)
author Bram Moolenaar <Bram@vim.org>
date Mon, 05 Sep 2022 18:00:05 +0200
parents bb0e525e1393
children 914b3c64ab92
comparison
equal deleted inserted replaced
30101:50cb1d7be810 30102:539fb427124d
1464 int cmd3, 1464 int cmd3,
1465 int cmd4, 1465 int cmd4,
1466 int cmd5) 1466 int cmd5)
1467 { 1467 {
1468 ResetRedobuff(); 1468 ResetRedobuff();
1469
1470 #ifdef FEAT_EVAL
1471 // Put info about a mapping in the redo buffer, so that "." will use the
1472 // same script context.
1473 may_add_last_used_map_to_redobuff();
1474 #endif
1475
1469 if (regname != 0) // yank from specified buffer 1476 if (regname != 0) // yank from specified buffer
1470 { 1477 {
1471 AppendCharToRedobuff('"'); 1478 AppendCharToRedobuff('"');
1472 AppendCharToRedobuff(regname); 1479 AppendCharToRedobuff(regname);
1473 } 1480 }