aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-01-16 19:08:27 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-01-16 19:08:27 -0800
commit25a42b99a54c93ab6ffb2c875f3e9cd38214d53e (patch)
tree6b14f59ab88175cb1d9f886467cc7d0fe5d836f1 /java/src
parentb22f77004af0f43c64030840e40138714a588b95 (diff)
parenta8ba49c2534220105ce302a50b3a9ddaf831ef20 (diff)
downloadlatinime-25a42b99a54c93ab6ffb2c875f3e9cd38214d53e.tar.gz
latinime-25a42b99a54c93ab6ffb2c875f3e9cd38214d53e.tar.xz
latinime-25a42b99a54c93ab6ffb2c875f3e9cd38214d53e.zip
am a8ba49c2: Small cleanup
* commit 'a8ba49c2534220105ce302a50b3a9ddaf831ef20': Small cleanup
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/EditingUtils.java17
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java2
2 files changed, 1 insertions, 18 deletions
diff --git a/java/src/com/android/inputmethod/latin/EditingUtils.java b/java/src/com/android/inputmethod/latin/EditingUtils.java
index 634dbbdfc..1e8ad1840 100644
--- a/java/src/com/android/inputmethod/latin/EditingUtils.java
+++ b/java/src/com/android/inputmethod/latin/EditingUtils.java
@@ -87,23 +87,6 @@ public class EditingUtils {
}
/**
- * Removes the word surrounding the cursor. Parameters are identical to
- * getWordAtCursor.
- */
- public static void deleteWordAtCursor(InputConnection connection, String separators) {
- // getWordRangeAtCursor returns null if the connection is null
- Range range = getWordRangeAtCursor(connection, separators);
- if (range == null) return;
-
- connection.finishComposingText();
- // Move cursor to beginning of word, to avoid crash when cursor is outside
- // of valid range after deleting text.
- int newCursor = getCursorPosition(connection) - range.mCharsBefore;
- connection.setSelection(newCursor, newCursor);
- connection.deleteSurroundingText(0, range.mCharsBefore + range.mCharsAfter);
- }
-
- /**
* Represents a range of text, relative to the current cursor position.
*/
public static class Range {
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 2f5f2a5dd..e6c4ba71b 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1399,7 +1399,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
if (mSuggestionsView != null && mSuggestionsView.dismissAddToDictionaryHint()) {
// Go back to the suggestion mode if the user canceled the
// "Touch again to save".
- // NOTE: In gerenal, we don't revert the word when backspacing
+ // NOTE: In general, we don't revert the word when backspacing
// from a manual suggestion pick. We deliberately chose a
// different behavior only in the case of picking the first
// suggestion (typed word). It's intentional to have made this