am 1252333e
: Merge "[IL23] Resolve a long-standing TODO."
* commit '1252333efdb45cfc67801d31ab1eef24315f2f27': [IL23] Resolve a long-standing TODO.
This commit is contained in:
commit
44d7325e8f
1 changed files with 3 additions and 4 deletions
|
@ -1131,10 +1131,9 @@ public final class InputLogic {
|
||||||
// We have a TLD (or something that looks like this): make sure we don't add
|
// We have a TLD (or something that looks like this): make sure we don't add
|
||||||
// a space even if currently in phantom mode.
|
// a space even if currently in phantom mode.
|
||||||
mSpaceState = SpaceState.NONE;
|
mSpaceState = SpaceState.NONE;
|
||||||
// TODO: use getCodePointBeforeCursor instead to improve performance and simplify the code
|
final int codePointBeforeCursor = mConnection.getCodePointBeforeCursor();
|
||||||
final CharSequence lastOne = mConnection.getTextBeforeCursor(1, 0);
|
// If no code point, #getCodePointBeforeCursor returns NOT_A_CODE_POINT.
|
||||||
if (lastOne != null && lastOne.length() == 1
|
if (Constants.CODE_PERIOD == codePointBeforeCursor) {
|
||||||
&& lastOne.charAt(0) == Constants.CODE_PERIOD) {
|
|
||||||
return text.substring(1);
|
return text.substring(1);
|
||||||
} else {
|
} else {
|
||||||
return text;
|
return text;
|
||||||
|
|
Loading…
Reference in a new issue