OSDN Git Service

Defer spelling correction with apostrophe
authorRaph Levien <raph@google.com>
Thu, 25 Sep 2014 19:50:16 +0000 (12:50 -0700)
committerRaph Levien <raph@google.com>
Fri, 26 Sep 2014 15:59:28 +0000 (08:59 -0700)
commitb1fef1114e31e35c90bc885fd9e8f9381895846f
tree1015938f9e1b7b4b0e9f8be77fa96d40c66baa22
parentfdb35f0526e63dc4d6882d86029d9beacc6a2d07
Defer spelling correction with apostrophe

When typing a contraction (such as "doesn't") we don't want a spell
right after the apostrophe, as this will create a false temporary red
underline, and the span split also breaks a kern pair causing text to
shift. This patch detects the case where the cursor is immediately after
such a word and suppresses correction in that case.

Bug: 17641350

Change-Id: I4d09576a31df551c96f820242fd2cbc675506dae
core/java/android/widget/SpellChecker.java