diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 45ecfd2e735c988414b89cb5a2879221bbb28ed5..95f89c0cc61797fe7131635412a01fa411c5932a 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -721,7 +721,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
             }
         }
 
-        mConnection.resetCachesUponCursorMove(mLastSelectionStart);
+        mConnection.resetCachesUponCursorMove(editorInfo.initialSelStart);
 
         if (isDifferentTextField) {
             mainKeyboardView.closing();