summaryrefslogtreecommitdiffstats
path: root/core/java/com/android
diff options
context:
space:
mode:
authorSatoshi Kataoka <>2009-03-24 19:39:54 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-24 19:39:54 -0700
commit6eb7298019c2e59877939474e7d77e8334192a98 (patch)
treea1006f778d9b893a087eb962ae6af6b39bfc44bf /core/java/com/android
parent10865523140286db1fa0838673a0a59b42e82a95 (diff)
downloadframeworks_base-6eb7298019c2e59877939474e7d77e8334192a98.zip
frameworks_base-6eb7298019c2e59877939474e7d77e8334192a98.tar.gz
frameworks_base-6eb7298019c2e59877939474e7d77e8334192a98.tar.bz2
Automated import from //branches/donutburger/...@141149,141149
Diffstat (limited to 'core/java/com/android')
-rw-r--r--core/java/com/android/internal/widget/EditStyledText.java7
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;
}
}