()
| 299 | } |
| 300 | |
| 301 | left(): Cursor { |
| 302 | if (this.offset === 0) return this |
| 303 | |
| 304 | const chip = this.imageRefEndingAt(this.offset) |
| 305 | if (chip) return new Cursor(this.measuredText, chip.start) |
| 306 | |
| 307 | const prevOffset = this.measuredText.prevOffset(this.offset) |
| 308 | return new Cursor(this.measuredText, prevOffset) |
| 309 | } |
| 310 | |
| 311 | right(): Cursor { |
| 312 | if (this.offset >= this.text.length) return this |
no test coverage detected