Created
July 23, 2020 20:26
-
-
Save cketti/65a75614082222a7c9bf0fa05c8781d2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void invalidateCursorPositionHack() { | |
int oldStart = getSelectionStart(); | |
int oldEnd = getSelectionEnd(); | |
// The selection values need to actually change in order for the cursor to be redrawn. If the cursor already | |
// is at position 0 this won't trigger a redraw. But that's fine because the size of our span can't influence | |
// cursor position 0. | |
setSelection(0); | |
setSelection(oldStart, oldEnd); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment