diff options
author | 2012-05-09 01:55:43 -0700 | |
---|---|---|
committer | 2012-05-09 01:55:43 -0700 | |
commit | 4e02b1273b939892a777e675ae29d8eddd82e57f (patch) | |
tree | ce7e4052834c6e0015767ae7bf5428ac29e01eb5 /java/src | |
parent | 5046197085ba42ef0e9dd27d77fdeb364aabebad (diff) | |
parent | 442ac5d0bb96ec257d26b28df2fabefdefe59b96 (diff) | |
download | latinime-4e02b1273b939892a777e675ae29d8eddd82e57f.tar.gz latinime-4e02b1273b939892a777e675ae29d8eddd82e57f.tar.xz latinime-4e02b1273b939892a777e675ae29d8eddd82e57f.zip |
am 442ac5d0: Merge "Don\'t ask for surrounding characters for each keypress" into jb-dev
* commit '442ac5d0bb96ec257d26b28df2fabefdefe59b96':
Don't ask for surrounding characters for each keypress
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index b250d70dc..81ce072b1 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1489,20 +1489,18 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen if ((isAlphabet(primaryCode) || mSettingsValues.isSymbolExcludedFromWordSeparators(primaryCode)) - && isSuggestionsRequested() && !isCursorTouchingWord()) { - if (!isComposingWord) { - // Reset entirely the composing state anyway, then start composing a new word unless - // the character is a single quote. The idea here is, single quote is not a - // separator and it should be treated as a normal character, except in the first - // position where it should not start composing a word. - isComposingWord = (Keyboard.CODE_SINGLE_QUOTE != primaryCode); - // Here we don't need to reset the last composed word. It will be reset - // when we commit this one, if we ever do; if on the other hand we backspace - // it entirely and resume suggestions on the previous word, we'd like to still - // have touch coordinates for it. - resetComposingState(false /* alsoResetLastComposedWord */); - clearSuggestions(); - } + && isSuggestionsRequested() && !isComposingWord && !isCursorTouchingWord()) { + // Reset entirely the composing state anyway, then start composing a new word unless + // the character is a single quote. The idea here is, single quote is not a + // separator and it should be treated as a normal character, except in the first + // position where it should not start composing a word. + isComposingWord = (Keyboard.CODE_SINGLE_QUOTE != primaryCode); + // Here we don't need to reset the last composed word. It will be reset + // when we commit this one, if we ever do; if on the other hand we backspace + // it entirely and resume suggestions on the previous word, we'd like to still + // have touch coordinates for it. + resetComposingState(false /* alsoResetLastComposedWord */); + clearSuggestions(); } if (isComposingWord) { mWordComposer.add( |