()
| 138 | } |
| 139 | |
| 140 | private deleteLineBackward(): void { |
| 141 | if (this._cursor === 0) { |
| 142 | return; |
| 143 | } |
| 144 | |
| 145 | const lastNewline = this._text.lastIndexOf("\n", this._cursor - 1); |
| 146 | const lineStart = lastNewline === -1 ? 0 : lastNewline + 1; |
| 147 | |
| 148 | if (lineStart === this._cursor) { |
| 149 | return; |
| 150 | } |
| 151 | |
| 152 | this._text = |
| 153 | this._text.slice(0, lineStart) + this._text.slice(this._cursor); |
| 154 | this._cursor = lineStart; |
| 155 | } |
| 156 | |
| 157 | private deleteLineForward(): void { |
| 158 | if (this._cursor >= this._text.length) { |
no outgoing calls
no test coverage detected