()
| 819 | } |
| 820 | |
| 821 | prevWORD(): Cursor { |
| 822 | // eslint-disable-next-line @typescript-eslint/no-this-alias |
| 823 | let cursor: Cursor = this |
| 824 | |
| 825 | // if we are already at the beginning of a WORD, step off it |
| 826 | if (cursor.left().isOverWhitespace()) { |
| 827 | cursor = cursor.left() |
| 828 | } |
| 829 | |
| 830 | // Move left over any whitespace characters |
| 831 | while (cursor.isOverWhitespace() && !cursor.isAtStart()) { |
| 832 | cursor = cursor.left() |
| 833 | } |
| 834 | |
| 835 | // If we're over a non-whitespace character, move to the start of this WORD |
| 836 | if (!cursor.isOverWhitespace()) { |
| 837 | while (!cursor.left().isOverWhitespace() && !cursor.isAtStart()) { |
| 838 | cursor = cursor.left() |
| 839 | } |
| 840 | } |
| 841 | |
| 842 | return cursor |
| 843 | } |
| 844 | |
| 845 | modifyText(end: Cursor, insertString: string = ''): Cursor { |
| 846 | const startOffset = this.offset |
no test coverage detected