mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Merge "Revert "Revert "Fix a race condition."""
This commit is contained in:
commit
0a0a3cdad8
@ -1114,8 +1114,11 @@ public final class InputLogic {
|
||||
keyboardSwitcher.getKeyboard());
|
||||
mWordComposer.setCursorPositionWithinWord(
|
||||
typedWord.codePointCount(0, numberOfCharsInWordBeforeCursor));
|
||||
mConnection.setComposingRegion(expectedCursorPosition - numberOfCharsInWordBeforeCursor,
|
||||
expectedCursorPosition + range.getNumberOfCharsInWordAfterCursor());
|
||||
// TODO: Change these two lines to setComposingRegion(cursorPosition,
|
||||
// cursorPosition + range.getNumberOfCharsInWordAfterCursor());
|
||||
mConnection.deleteSurroundingText(numberOfCharsInWordBeforeCursor,
|
||||
typedWord.length() - numberOfCharsInWordBeforeCursor);
|
||||
mConnection.setComposingText(typedWord, 1);
|
||||
if (suggestions.isEmpty()) {
|
||||
// We come here if there weren't any suggestion spans on this word. We will try to
|
||||
// compute suggestions for it instead.
|
||||
|
Loading…
Reference in New Issue
Block a user