mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-30 11:38:07 +00:00
don't append text if there is no text
fixes #389 bug was present also in old versions, but only exposed due to possibilty of using arrow keys
This commit is contained in:
parent
7758f125a5
commit
545991260b
1 changed files with 4 additions and 1 deletions
|
@ -559,7 +559,10 @@ public final class RichInputConnection implements PrivateCommandPerformer {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
final String text = StringUtils.newSingleCodePointString(keyEvent.getUnicodeChar());
|
final int codePoint = keyEvent.getUnicodeChar();
|
||||||
|
if (Character.isISOControl(codePoint))
|
||||||
|
break; // don't append text if there is no actual text
|
||||||
|
final String text = StringUtils.newSingleCodePointString(codePoint);
|
||||||
mCommittedTextBeforeComposingText.append(text);
|
mCommittedTextBeforeComposingText.append(text);
|
||||||
mExpectedSelStart += text.length();
|
mExpectedSelStart += text.length();
|
||||||
mExpectedSelEnd = mExpectedSelStart;
|
mExpectedSelEnd = mExpectedSelStart;
|
||||||
|
|
Loading…
Add table
Reference in a new issue