()
| 274 | } |
| 275 | |
| 276 | left(): Cursor { |
| 277 | if (this.offset === 0) return this |
| 278 | |
| 279 | const chip = this.imageRefEndingAt(this.offset) |
| 280 | if (chip) return new Cursor(this.measuredText, chip.start) |
| 281 | |
| 282 | const prevOffset = this.measuredText.prevOffset(this.offset) |
| 283 | return new Cursor(this.measuredText, prevOffset) |
| 284 | } |
| 285 | |
| 286 | right(): Cursor { |
| 287 | if (this.offset >= this.text.length) return this |
no test coverage detected