()
| 794 | } |
| 795 | |
| 796 | prevWORD(): Cursor { |
| 797 | // eslint-disable-next-line @typescript-eslint/no-this-alias |
| 798 | let cursor: Cursor = this |
| 799 | |
| 800 | // if we are already at the beginning of a WORD, step off it |
| 801 | if (cursor.left().isOverWhitespace()) { |
| 802 | cursor = cursor.left() |
| 803 | } |
| 804 | |
| 805 | // Move left over any whitespace characters |
| 806 | while (cursor.isOverWhitespace() && !cursor.isAtStart()) { |
| 807 | cursor = cursor.left() |
| 808 | } |
| 809 | |
| 810 | // If we're over a non-whitespace character, move to the start of this WORD |
| 811 | if (!cursor.isOverWhitespace()) { |
| 812 | while (!cursor.left().isOverWhitespace() && !cursor.isAtStart()) { |
| 813 | cursor = cursor.left() |
| 814 | } |
| 815 | } |
| 816 | |
| 817 | return cursor |
| 818 | } |
| 819 | |
| 820 | modifyText(end: Cursor, insertString: string = ''): Cursor { |
| 821 | const startOffset = this.offset |
no test coverage detected