(text: string)
| 44 | } |
| 45 | |
| 46 | insertText(text: string): void { |
| 47 | // Normalize line endings to prevent terminal display issues |
| 48 | const normalizedText = text.replace(/\r\n/g, "\n").replace(/\r/g, "\n"); |
| 49 | this._text = |
| 50 | this._text.slice(0, this._cursor) + |
| 51 | normalizedText + |
| 52 | this._text.slice(this._cursor); |
| 53 | this._cursor += normalizedText.length; |
| 54 | } |
| 55 | |
| 56 | deleteCharAt(position: number): void { |
| 57 | if (position >= 0 && position < this._text.length) { |
no test coverage detected