aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/WordComposer.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-02-21 23:17:54 -0800
committerJean Chalard <jchalard@google.com>2012-02-21 23:33:58 -0800
commit66bb563535dbe3672f99f75bd71763a551444867 (patch)
tree6cf74a9cab2fd3e29a8ca573e61adce47993eace /java/src/com/android/inputmethod/latin/WordComposer.java
parentcf9d92629cae88273805eaf7984fcfdd8afd11f5 (diff)
downloadlatinime-66bb563535dbe3672f99f75bd71763a551444867.tar.gz
latinime-66bb563535dbe3672f99f75bd71763a551444867.tar.xz
latinime-66bb563535dbe3672f99f75bd71763a551444867.zip
Give LastComposedWord knowledge of the separator (A2)
This stores the separator that was used to commit the word in the LastComposedWord. It may be NOT_A_SEPARATOR if there was no separator (for example, the cursor moved causing a commit, or there was a manual pick). This is necessary to implement feature request #5968922. Change-Id: I5fcf19a78ec66d68d4df89418eaef13952588207
Diffstat (limited to 'java/src/com/android/inputmethod/latin/WordComposer.java')
-rw-r--r--java/src/com/android/inputmethod/latin/WordComposer.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/WordComposer.java b/java/src/com/android/inputmethod/latin/WordComposer.java
index 1f9371538..0fa28e49e 100644
--- a/java/src/com/android/inputmethod/latin/WordComposer.java
+++ b/java/src/com/android/inputmethod/latin/WordComposer.java
@@ -308,7 +308,8 @@ public class WordComposer {
}
// `type' should be one of the LastComposedWord.COMMIT_TYPE_* constants above.
- public LastComposedWord commitWord(final int type, final String committedWord) {
+ public LastComposedWord commitWord(final int type, final String committedWord,
+ final int separatorCode) {
// Note: currently, we come here whenever we commit a word. If it's any *other* kind than
// DECIDED_WORD, we should deactivate the last composed word so that we don't attempt to
// cancel later.
@@ -327,7 +328,7 @@ public class WordComposer {
mXCoordinates = new int[N];
mYCoordinates = new int[N];
final LastComposedWord lastComposedWord = new LastComposedWord(codes,
- xCoordinates, yCoordinates, mTypedWord.toString(), committedWord);
+ xCoordinates, yCoordinates, mTypedWord.toString(), committedWord, separatorCode);
if (type != LastComposedWord.COMMIT_TYPE_DECIDED_WORD) {
lastComposedWord.deactivate();
}