Skip to content

Commit d0e33d2

Browse files
committed
Ensure & creates an undo point
1 parent 6214cdd commit d0e33d2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/actions/base.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ export abstract class BaseAction {
2121
*/
2222
public isJump = false;
2323

24+
/**
25+
* TODO: This property is a lie - it pertains to whether an action creates an undo point...
26+
* See #5058 and rationalize ASAP.
27+
*/
2428
public canBeRepeatedWithDot = false;
2529

2630
/**
@@ -201,8 +205,6 @@ export abstract class BaseCommand extends BaseAction {
201205
*/
202206
runsOnceForEachCountPrefix = false;
203207

204-
canBeRepeatedWithDot = false;
205-
206208
/**
207209
* Run the command a single time.
208210
*/

src/actions/commands/actions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,7 @@ class CommandDot extends BaseCommand {
851851
class CommandRepeatSubstitution extends BaseCommand {
852852
modes = [Mode.Normal];
853853
keys = ['&'];
854+
canBeRepeatedWithDot = true;
854855

855856
public async exec(position: Position, vimState: VimState): Promise<void> {
856857
// Parsing the command from a string, while not ideal, is currently

0 commit comments

Comments
 (0)