diff options
author | 2011-09-01 22:57:39 -0700 | |
---|---|---|
committer | 2011-09-01 22:57:39 -0700 | |
commit | 66a5884ad8df544f1c462148e763b29c7202f7b8 (patch) | |
tree | 1d4b256d491932f11df83ad40e040abd004d1fca /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | 78778ca9df9e75ece5beadd314ed0ed77dbd2a02 (diff) | |
parent | 1531528bfe01d0ce88888d23952a4c7092a15f17 (diff) | |
download | latinime-66a5884ad8df544f1c462148e763b29c7202f7b8.tar.gz latinime-66a5884ad8df544f1c462148e763b29c7202f7b8.tar.xz latinime-66a5884ad8df544f1c462148e763b29c7202f7b8.zip |
Merge "Add an option to prevent insertion of suggestion spans"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 85363fd36..cea59fe0a 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1807,9 +1807,13 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar final InputConnection ic = getCurrentInputConnection(); if (ic != null) { mVoiceProxy.rememberReplacedWord(bestWord, mSettingsValues.mWordSeparators); - SuggestedWords suggestedWords = mSuggestionsView.getSuggestions(); - ic.commitText(SuggestionSpanUtils.getTextWithSuggestionSpan( - this, bestWord, suggestedWords), 1); + if (mSettingsValues.mEnableSuggestionSpanInsertion) { + final SuggestedWords suggestedWords = mSuggestionsView.getSuggestions(); + ic.commitText(SuggestionSpanUtils.getTextWithSuggestionSpan( + this, bestWord, suggestedWords), 1); + } else { + ic.commitText(bestWord, 1); + } } mRecorrection.saveRecorrectionSuggestion(mWordComposer, bestWord); mHasUncommittedTypedChars = false; |