()
| 340 | } |
| 341 | |
| 342 | private undo(): void { |
| 343 | const snapshot = this.undoStack.pop(); |
| 344 | if (!snapshot) return; |
| 345 | this.value = snapshot.value; |
| 346 | this.cursor = snapshot.cursor; |
| 347 | this.lastAction = null; |
| 348 | } |
| 349 | |
| 350 | private moveWordBackwards(): void { |
| 351 | if (this.cursor === 0) return; |