Skip to content
Snippets Groups Projects
Commit 4456d1a8 authored by Jean Chalard's avatar Jean Chalard Committed by Android (Google) Code Review
Browse files

Merge "Have double-space-to-period cancel leave a single space"

parents f9456855 522d13c3
No related branches found
No related tags found
No related merge requests found
......@@ -654,9 +654,11 @@ public final class RichInputConnection {
+ "\"" + periodSpace + "\" just before the cursor.");
return false;
}
// Double-space results in ". ". A backspace to cancel this should result in a single
// space in the text field, so we replace ". " with a single space.
deleteSurroundingText(2, 0);
final String doubleSpace = " ";
commitText(doubleSpace, 1);
final String singleSpace = " ";
commitText(singleSpace, 1);
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
ResearchLogger.richInputConnection_revertDoubleSpacePeriod();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment