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