summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Gilles Debunne <debunne@google.com> 2012-04-18 17:57:45 -0700
committer Gilles Debunne <debunne@google.com> 2012-04-20 10:59:04 -0700
commit2eb70fb257623de7d32e8c1a878f4c03b71846d1 (patch)
tree42d003d829c0312c6d031da9b8679c05bc750f93
parentd7f256dd2f31ec74c8154f783a660dfe3e55b036 (diff)
Cursor is moved at end of word when it is added to dictionary
Bug 6355904 Change-Id: Ib56b719d0c3001ce975bccf8dd80c138bffc24cc
-rw-r--r--core/java/android/widget/Editor.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index 040a3853a273..34fc8d27b632 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -2545,6 +2545,7 @@ public class Editor {
// There is no way to know if the word was indeed added. Re-check.
// TODO The ExtractEditText should remove the span in the original text instead
editable.removeSpan(suggestionInfo.suggestionSpan);
+ Selection.setSelection(editable, spanEnd);
updateSpellCheckSpans(spanStart, spanEnd, false);
} else {
// SuggestionSpans are removed by replace: save them before