()
| 19 | // Return the character following (to the right of) the focus, and leave the selection unchanged, |
| 20 | // or return undefined. |
| 21 | getNextForwardCharacter() { |
| 22 | const beforeText = this.selection.toString(); |
| 23 | if ((beforeText.length === 0) || (this.getDirection() === forward)) { |
| 24 | this.selection.modify("extend", forward, character); |
| 25 | const afterText = this.selection.toString(); |
| 26 | if (beforeText !== afterText) { |
| 27 | this.selection.modify("extend", backward, character); |
| 28 | return afterText[afterText.length - 1]; |
| 29 | } |
| 30 | } else { |
| 31 | return beforeText[0]; // The existing range selection is backwards. |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | // Test whether the character following the focus is a word character (and leave the selection unchanged). |
| 36 | nextCharacterIsWordCharacter() { |
no test coverage detected