* Insert text at the current cursor position. * Used for programmatic insertion (e.g., clipboard image markers). * This is atomic for undo - single undo restores entire pre-insert state.
(text: string)
| 1121 | * This is atomic for undo - single undo restores entire pre-insert state. |
| 1122 | */ |
| 1123 | insertTextAtCursor(text: string): void { |
| 1124 | if (!text) return; |
| 1125 | this.cancelAutocomplete(); |
| 1126 | this.pushUndoSnapshot(); |
| 1127 | this.lastAction = null; |
| 1128 | this.exitHistoryBrowsing(); |
| 1129 | this.insertTextAtCursorInternal(text); |
| 1130 | } |
| 1131 | |
| 1132 | /** |
| 1133 | * Normalize text for editor storage: |
nothing calls this directly
no test coverage detected