OSDN Git Service

Merge "Consider punctuation treatment when selecting text." into mnc-dev
authorMady Mellor <madym@google.com>
Thu, 7 May 2015 21:59:35 +0000 (21:59 +0000)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Thu, 7 May 2015 21:59:39 +0000 (21:59 +0000)
1  2 
core/java/android/widget/Editor.java

@@@ -3899,9 -3960,13 +3956,9 @@@ public class Editor 
          public void updatePosition(float x, float y) {
              final int trueOffset = mTextView.getOffsetForPosition(x, y);
              final int currLine = mTextView.getLineAtCoordinate(y);
 -
 -            // Don't select white space on different lines.
 -            if (isWhitespaceLine(mPrevLine, currLine, trueOffset)) return;
 -
              boolean positionCursor = false;
              int offset = trueOffset;
-             int end = getWordEnd(offset, true);
+             int end = getWordEnd(offset);
              int start = getWordStart(offset);
  
              if (offset < mPreviousOffset) {
          public void updatePosition(float x, float y) {
              final int trueOffset = mTextView.getOffsetForPosition(x, y);
              final int currLine = mTextView.getLineAtCoordinate(y);
 -
 -            // Don't select white space on different lines.
 -            if (isWhitespaceLine(mPrevLine, currLine, trueOffset)) return;
 -
              int offset = trueOffset;
              boolean positionCursor = false;
-             int end = getWordEnd(offset, true);
+             int end = getWordEnd(offset);
              int start = getWordStart(offset);
  
              if (offset > mPreviousOffset) {