From 8e235191dd3501fc3562fe0654d41501ec9760d0 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Mon, 22 Dec 2014 17:18:56 +0900 Subject: Fix moving the cursor inside composition in lang w/o spaces Also introduce the cursor move event, which we needed to do anyway Bug: 18827118 Change-Id: I30e994764c095b4423b874dc05d1bbedc0de592f --- java/src/com/android/inputmethod/latin/WordComposer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/WordComposer.java') diff --git a/java/src/com/android/inputmethod/latin/WordComposer.java b/java/src/com/android/inputmethod/latin/WordComposer.java index 78860d87d..e605bfe78 100644 --- a/java/src/com/android/inputmethod/latin/WordComposer.java +++ b/java/src/com/android/inputmethod/latin/WordComposer.java @@ -231,8 +231,6 @@ public final class WordComposer { * @return true if the cursor is still inside the composing word, false otherwise. */ public boolean moveCursorByAndReturnIfInsideComposingWord(final int expectedMoveAmount) { - // TODO: should uncommit the composing feedback - mCombinerChain.reset(); int actualMoveAmountWithinWord = 0; int cursorPos = mCursorPositionWithinWord; // TODO: Don't make that copy. We can do this directly from mTypedWordCache. @@ -256,6 +254,8 @@ public final class WordComposer { // so the result would not be inside the composing word. if (actualMoveAmountWithinWord != expectedMoveAmount) return false; mCursorPositionWithinWord = cursorPos; + mCombinerChain.applyProcessedEvent(mCombinerChain.processEvent(mEvents, + Event.createCursorMovedEvent(cursorPos))); return true; } -- cgit v1.2.3-83-g751a