History - fix off-by-one error

This commit is contained in:
2026-02-22 10:11:49 -06:00
parent d52b121fd7
commit 8d16fb41ab
2 changed files with 2 additions and 2 deletions

View File

@@ -24,7 +24,7 @@ export class Redo extends Command<{ steps?: StrTerm }> {
: 1 : 1
await vm.control$.next({ cmd: 'preserve-history' }) 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' }) await vm.control$.next({ cmd: 'redo' })
} }

View File

@@ -24,7 +24,7 @@ export class Undo extends Command<{ steps?: StrTerm }> {
: 1 : 1
await vm.control$.next({ cmd: 'preserve-history' }) 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' }) await vm.control$.next({ cmd: 'undo' })
} }