aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-12-27 15:29:39 +0900
committerJean Chalard <jchalard@google.com>2012-12-27 15:42:14 +0900
commit0abc48218ee90b1d8df77dfa131ce05fbaba7121 (patch)
tree7cbe573064567a22bad2ec9e25f13e3369162898 /java/src/com
parent5bde3a61633556afb16481680daefc7cabbf5890 (diff)
downloadlatinime-0abc48218ee90b1d8df77dfa131ce05fbaba7121.tar.gz
latinime-0abc48218ee90b1d8df77dfa131ce05fbaba7121.tar.xz
latinime-0abc48218ee90b1d8df77dfa131ce05fbaba7121.zip
Rename some confusing variables
Change-Id: Ib0de800599ae7f12c86270a627616d5b52366414
Diffstat (limited to 'java/src/com')
-rw-r--r--java/src/com/android/inputmethod/latin/RichInputConnection.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java
index f126e7d2a..a4b5921e7 100644
--- a/java/src/com/android/inputmethod/latin/RichInputConnection.java
+++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java
@@ -534,17 +534,17 @@ public final class RichInputConnection {
// Going backward, alternate skipping non-separators and separators until enough words
// have been read.
int count = additionalPrecedingWordsCount;
- int start = before.length();
+ int startIndexInBefore = before.length();
boolean isStoppingAtWhitespace = true; // toggles to indicate what to stop at
while (true) { // see comments below for why this is guaranteed to halt
- while (start > 0) {
- final int codePoint = Character.codePointBefore(before, start);
+ while (startIndexInBefore > 0) {
+ final int codePoint = Character.codePointBefore(before, startIndexInBefore);
if (isStoppingAtWhitespace == isSeparator(codePoint, sep)) {
break; // inner loop
}
- --start;
+ --startIndexInBefore;
if (Character.isSupplementaryCodePoint(codePoint)) {
- --start;
+ --startIndexInBefore;
}
}
// isStoppingAtWhitespace is true every other time through the loop,
@@ -557,20 +557,20 @@ public final class RichInputConnection {
}
// Find last word separator after the cursor
- int end = -1;
- while (++end < after.length()) {
- final int codePoint = Character.codePointAt(after, end);
+ int endIndexInAfter = -1;
+ while (++endIndexInAfter < after.length()) {
+ final int codePoint = Character.codePointAt(after, endIndexInAfter);
if (isSeparator(codePoint, sep)) {
break;
}
if (Character.isSupplementaryCodePoint(codePoint)) {
- ++end;
+ ++endIndexInAfter;
}
}
- final String word = before.toString().substring(start, before.length())
- + after.toString().substring(0, end);
- return new Range(before.length() - start, end, word);
+ final String word = before.toString().substring(startIndexInBefore, before.length())
+ + after.toString().substring(0, endIndexInAfter);
+ return new Range(before.length() - startIndexInBefore, endIndexInAfter, word);
}
public boolean isCursorTouchingWord(final SettingsValues settingsValues) {