(direction, { length } = {})
| 562 | } |
| 563 | |
| 564 | getExpandedRangeInDirection(direction, { length } = {}) { |
| 565 | let [ startPosition, endPosition ] = Array.from(this.getSelectedRange()) |
| 566 | if (direction === "backward") { |
| 567 | if (length) { |
| 568 | startPosition -= length |
| 569 | } else { |
| 570 | startPosition = this.translateUTF16PositionFromOffset(startPosition, -1) |
| 571 | } |
| 572 | } else { |
| 573 | if (length) { |
| 574 | endPosition += length |
| 575 | } else { |
| 576 | endPosition = this.translateUTF16PositionFromOffset(endPosition, 1) |
| 577 | } |
| 578 | } |
| 579 | return normalizeRange([ startPosition, endPosition ]) |
| 580 | } |
| 581 | |
| 582 | shouldManageMovingCursorInDirection(direction) { |
| 583 | if (this.editingAttachment) { |
no test coverage detected