diff --git a/src/vm/commands/redo.ts b/src/vm/commands/redo.ts index 0f86c98..12cf831 100644 --- a/src/vm/commands/redo.ts +++ b/src/vm/commands/redo.ts @@ -24,7 +24,7 @@ export class Redo extends Command<{ steps?: StrTerm }> { : 1 await vm.control$.next({ cmd: 'preserve-history' }) - for ( let i = 0; i <= steps; i++) { + for ( let i = 0; i < steps; i++) { await vm.control$.next({ cmd: 'redo' }) } diff --git a/src/vm/commands/undo.ts b/src/vm/commands/undo.ts index 86d490d..cec27d7 100644 --- a/src/vm/commands/undo.ts +++ b/src/vm/commands/undo.ts @@ -24,7 +24,7 @@ export class Undo extends Command<{ steps?: StrTerm }> { : 1 await vm.control$.next({ cmd: 'preserve-history' }) - for ( let i = 0; i <= steps; i++) { + for ( let i = 0; i < steps; i++) { await vm.control$.next({ cmd: 'undo' }) }