Loading java/src/com/android/inputmethod/latin/EditingUtils.java +0 −17 Original line number Diff line number Diff line Loading @@ -86,23 +86,6 @@ public class EditingUtils { return (r == null) ? null : r.mWord; } /** * 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. */ Loading java/src/com/android/inputmethod/latin/LatinIME.java +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading Loading
java/src/com/android/inputmethod/latin/EditingUtils.java +0 −17 Original line number Diff line number Diff line Loading @@ -86,23 +86,6 @@ public class EditingUtils { return (r == null) ? null : r.mWord; } /** * 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. */ Loading
java/src/com/android/inputmethod/latin/LatinIME.java +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading