mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-19 21:59:11 +00:00
prevent selected text being the first suggestion when overwriting with glide typing
fixes #1284
This commit is contained in:
parent
de5968d04a
commit
7e3657185f
1 changed files with 5 additions and 0 deletions
|
@ -535,6 +535,11 @@ public final class InputLogic {
|
|||
} else {
|
||||
commitTyped(settingsValues, LastComposedWord.NOT_A_SEPARATOR);
|
||||
}
|
||||
} else if (mConnection.hasSelection()) {
|
||||
final CharSequence selectedText = mConnection.getSelectedText(0);
|
||||
if (selectedText != null)
|
||||
// set selected text as rejected to avoid glide typing resulting in exactly the selected word again
|
||||
mWordComposer.setRejectedBatchModeSuggestion(selectedText.toString());
|
||||
}
|
||||
final int codePointBeforeCursor = mConnection.getCodePointBeforeCursor();
|
||||
if (Character.isLetterOrDigit(codePointBeforeCursor)
|
||||
|
|
Loading…
Add table
Reference in a new issue