aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-12-26 23:13:58 +0900
committerJean Chalard <jchalard@google.com>2013-12-26 23:19:29 +0900
commit6bca9ac43d0db9a83b02577783cc609ecf13e3f4 (patch)
tree76cb4cd99137d12bbf22a2a66549210c023e039a /java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
parent33b2aaafc25acbfae1a670435ceb7cd7fe624a1c (diff)
downloadlatinime-6bca9ac43d0db9a83b02577783cc609ecf13e3f4.tar.gz
latinime-6bca9ac43d0db9a83b02577783cc609ecf13e3f4.tar.xz
latinime-6bca9ac43d0db9a83b02577783cc609ecf13e3f4.zip
Fix a bug where predictions would not pop upon manual pick
Bug: 12295276 Change-Id: Id359c92acde44758b12929e7bac719d5c9c7577b
Diffstat (limited to 'java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java')
-rw-r--r--java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
index 488ce6e7b..59b722134 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -1621,8 +1621,11 @@ public final class InputLogic {
chosenWord, separatorString, prevWord);
final boolean shouldDiscardPreviousWordForSuggestion;
if (0 == StringUtils.codePointCount(separatorString)) {
- // Separator is 0-length. Discard the word only if the current language has spaces.
- shouldDiscardPreviousWordForSuggestion = settingsValues.mCurrentLanguageHasSpaces;
+ // Separator is 0-length, we can keep the previous word for suggestion. Either this
+ // was a manual pick or the language has no spaces in which case we want to keep the
+ // previous word, or it was the keyboard closing or the cursor moving in which case it
+ // will be reset anyway.
+ shouldDiscardPreviousWordForSuggestion = false;
} else {
// Otherwise, we discard if the separator contains any non-whitespace.
shouldDiscardPreviousWordForSuggestion =