Small rename
Left/Right is wrong terminology here Change-Id: I58c55849e45d9984dd3fb7b75a64e07667c9eba4
This commit is contained in:
parent
f8b39f39cd
commit
8667bbeab3
1 changed files with 4 additions and 6 deletions
|
@ -2132,14 +2132,12 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
public boolean isCursorTouchingWord() {
|
public boolean isCursorTouchingWord() {
|
||||||
final InputConnection ic = getCurrentInputConnection();
|
final InputConnection ic = getCurrentInputConnection();
|
||||||
if (ic == null) return false;
|
if (ic == null) return false;
|
||||||
CharSequence toLeft = ic.getTextBeforeCursor(1, 0);
|
CharSequence before = ic.getTextBeforeCursor(1, 0);
|
||||||
CharSequence toRight = ic.getTextAfterCursor(1, 0);
|
CharSequence after = ic.getTextAfterCursor(1, 0);
|
||||||
if (!TextUtils.isEmpty(toLeft)
|
if (!TextUtils.isEmpty(before) && !mSettingsValues.isWordSeparator(before.charAt(0))) {
|
||||||
&& !mSettingsValues.isWordSeparator(toLeft.charAt(0))) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!TextUtils.isEmpty(toRight)
|
if (!TextUtils.isEmpty(after) && !mSettingsValues.isWordSeparator(after.charAt(0))) {
|
||||||
&& !mSettingsValues.isWordSeparator(toRight.charAt(0))) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue