Fix: A part of grapheme cluster can be selected.

Previously, when a selection handle is about to pass the other
handle, the offset of the handle was computed with +1 or -1 to
the offset, without considering UTF-16 surrogate pairs or grapheme
clusters. This patch consistently uses grapheme clusters to compute
the new offset in such cases.

Bug: 20112392
Change-Id: I2b5e206d20886ca7ceb9f4375ee0d66f2328f99d
1 file changed