Clean cherry-pick: Handle deleting non-single-word characters at end of input.
Handle deleting non-single-word characters at end of input. This includes both multi-word code-points and compositions of multiple single-word code-points.
A "backspace" from Android IME will send 1,0 as parameters to extendSelectionAndDelete(...) but it's possible that the last character of the input is a multi-word code and take multiple positions.
The setSelectedRange() call made by setSelectionOffsets() will _reduce_ the range to include only full characters and can end up reducing the range all the way to zero and causing the deleteSelection() call to do nothing.
3 files changed