Merge "Text selection: When user reaches midpoint jump to end of word" into mnc-dev
This commit is contained in:
@@ -4173,7 +4173,7 @@ public class Editor {
|
|||||||
if (!mInWord || currLine < mPrevLine) {
|
if (!mInWord || currLine < mPrevLine) {
|
||||||
// We're not in a word, or we're on a different line so we'll expand by
|
// We're not in a word, or we're on a different line so we'll expand by
|
||||||
// word. First ensure the user has at least entered the next word.
|
// word. First ensure the user has at least entered the next word.
|
||||||
int offsetToWord = Math.min((end - start) / 2, 2);
|
int offsetToWord = (end - start) / 2;
|
||||||
if (offset <= end - offsetToWord || currLine < mPrevLine) {
|
if (offset <= end - offsetToWord || currLine < mPrevLine) {
|
||||||
offset = start;
|
offset = start;
|
||||||
} else {
|
} else {
|
||||||
@@ -4354,7 +4354,7 @@ public class Editor {
|
|||||||
if (!mInWord || currLine > mPrevLine) {
|
if (!mInWord || currLine > mPrevLine) {
|
||||||
// We're not in a word, or we're on a different line so we'll expand by
|
// We're not in a word, or we're on a different line so we'll expand by
|
||||||
// word. First ensure the user has at least entered the next word.
|
// word. First ensure the user has at least entered the next word.
|
||||||
int midPoint = Math.min((end - start) / 2, 2);
|
int midPoint = (end - start) / 2;
|
||||||
if (offset >= start + midPoint || currLine > mPrevLine) {
|
if (offset >= start + midPoint || currLine > mPrevLine) {
|
||||||
offset = end;
|
offset = end;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user