From 12d67e6d5d5bd764117038f3f666d4d7da0c10ea Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Tue, 7 Feb 2012 20:36:48 +0900 Subject: [PATCH] Fix a bug with manual pick then dotcom key Inhibit adding phantom space for tld keys even if the last character inserted in the textview is not a dot Change-Id: Ie92554ead7a18c932480905c5738aff7c0159a32 --- java/src/com/android/inputmethod/latin/LatinIME.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 20ec090d2..2fc28def2 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1326,10 +1326,12 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // Not a tld: do nothing. return text; } + // We have a TLD (or something that looks like this): make sure we don't add + // a space even if currently in phantom mode. + mSpaceState = SPACE_STATE_NONE; final CharSequence lastOne = ic.getTextBeforeCursor(1, 0); if (lastOne != null && lastOne.length() == 1 && lastOne.charAt(0) == Keyboard.CODE_PERIOD) { - mSpaceState = SPACE_STATE_NONE; return text.subSequence(1, text.length()); } else { return text;