()
| 235 | } |
| 236 | |
| 237 | private handleForwardDelete(): void { |
| 238 | this.lastAction = null; |
| 239 | if (this.cursor < this.value.length) { |
| 240 | this.pushUndo(); |
| 241 | const afterCursor = this.value.slice(this.cursor); |
| 242 | const graphemes = [...segmenter.segment(afterCursor)]; |
| 243 | const firstGrapheme = graphemes[0]; |
| 244 | const graphemeLength = firstGrapheme ? firstGrapheme.segment.length : 1; |
| 245 | this.value = this.value.slice(0, this.cursor) + this.value.slice(this.cursor + graphemeLength); |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | private deleteToLineStart(): void { |
| 250 | if (this.cursor === 0) return; |
no test coverage detected