summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Gilles Debunne <debunne@google.com> 2010-12-14 10:35:19 -0800
committer Gilles Debunne <debunne@google.com> 2010-12-14 10:39:32 -0800
commit2bc248b698b17fd333beae828039a8bff7604a9f (patch)
tree121d00ef62dfc49b56712f5b3cd6a97bc049ad76
parent89f8d63a991f2dc4a961ad92ab5bb6b6c1ecd60f (diff)
Off by one index error in word selection
Change-Id: Ia6b14b22cc5cf65a235bcdf7cbec48bd76f74460
-rw-r--r--core/java/android/widget/TextView.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 751cd53eaec8..d21870cecb3a 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -7646,7 +7646,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
if (start == end) {
// Cases where the text ends with a '.' and we select from the end of the line
// (right after the dot), or when we select from the space character in "aaa, bbb".
- final char c = mTransformed.charAt(start);
+ final char c = mTransformed.charAt(start - 1);
final int type = Character.getType(c);
if (type == Character.OTHER_PUNCTUATION) continue;
}