Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32f0af1f authored by Jean Chalard's avatar Jean Chalard
Browse files

Implement cancelling a manual pick (A4)

This is new code, but simple code. The new code path is never
used for now, but it will be in an upcoming change. This serves
to implement feature request #5968922

Change-Id: I3e67731ec6e9fc0b86c5cbd972e9c081781c11a9
parent 193d23f4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2230,8 +2230,10 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
        ic.deleteSurroundingText(cancelLength + separatorLength, 0);
        if (0 == separatorLength || mLastComposedWord.didCommitTypedWord()) {
            // This is the case when we cancel a manual pick.
            // TODO: implement this
            // We should restart suggestion on the word right away.
            mWordComposer.resumeSuggestionOnLastComposedWord(mLastComposedWord);
            mComposingStateManager.onStartComposingText();
            ic.setComposingText(originallyTypedWord, 1);
        } else {
            ic.commitText(originallyTypedWord, 1);
            // Re-insert the separator