diff options
author | Satoshi Kataoka <> | 2009-03-24 19:39:35 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-24 19:39:35 -0700 |
commit | e1e5df58b2b8c733441c6dca8c96b35a39f9a349 (patch) | |
tree | 4b0c6f06f7b08f46e05f3e3ef82c44738248105f /core | |
parent | 6025a97a5cec9eff78834f03ca96e73c500455f7 (diff) | |
download | frameworks_base-e1e5df58b2b8c733441c6dca8c96b35a39f9a349.zip frameworks_base-e1e5df58b2b8c733441c6dca8c96b35a39f9a349.tar.gz frameworks_base-e1e5df58b2b8c733441c6dca8c96b35a39f9a349.tar.bz2 |
Automated import from //branches/master/...@141151,141151
Diffstat (limited to 'core')
-rw-r--r-- | core/java/com/android/internal/widget/EditStyledText.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/java/com/android/internal/widget/EditStyledText.java b/core/java/com/android/internal/widget/EditStyledText.java index da10d74..3da9753 100644 --- a/core/java/com/android/internal/widget/EditStyledText.java +++ b/core/java/com/android/internal/widget/EditStyledText.java @@ -471,6 +471,7 @@ public class EditStyledText extends EditText { if (DBG) { Log.d(LOG_TAG, "--- onStartEdit"); } + Log.d(LOG_TAG, "--- onstartedit:" + this.getSelectionStart() + this.getSelectionEnd()); handleResetEdit(); mEST.notifyStateChanged(mMode, mState); } @@ -855,6 +856,7 @@ public class EditStyledText extends EditText { if (DBG) { Log.d(LOG_TAG, "Reset Editor"); } + blockSoftKey(); handleCancel(); mEditFlag = true; mEST.setHintMessage(HINT_MSG_SELECT_START); @@ -967,8 +969,7 @@ public class EditStyledText extends EditText { } int pos = current; for (; pos > 0; pos--) { - if (text.charAt(pos) == '\n') { - pos++; + if (text.charAt(pos - 1) == '\n') { break; } } @@ -982,7 +983,7 @@ public class EditStyledText extends EditText { } int pos = current; for (; pos < text.length(); pos++) { - if (text.charAt(pos) == '\n') { + if (pos > 0 && text.charAt(pos - 1) == '\n') { break; } } |