History - fix off-by-one error
This commit is contained in:
@@ -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' })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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' })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user