diff options
Diffstat (limited to 'apps/web/src/core/managers/commands.ts')
| -rw-r--r-- | apps/web/src/core/managers/commands.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/web/src/core/managers/commands.ts b/apps/web/src/core/managers/commands.ts index d996a30e..46ee643a 100644 --- a/apps/web/src/core/managers/commands.ts +++ b/apps/web/src/core/managers/commands.ts @@ -11,6 +11,11 @@ export class CommandManager { return command; } + push({ command }: { command: Command }): void { + this.history.push(command); + this.redoStack = []; + } + undo(): void { if (this.history.length === 0) return; const command = this.history.pop(); |
