diff options
| author | Raph Levien <raph@google.com> | 2013-09-20 15:11:52 -0700 |
|---|---|---|
| committer | Raph Levien <raph@google.com> | 2013-09-20 15:21:47 -0700 |
| commit | 373b7a8d4e9dce4f71539d4dbcf627fd3e1a39da (patch) | |
| tree | cd34986f431d7769c630a5167d1cd9cb4d4f9c9f /core/java/android/text/Layout.java | |
| parent | 562ce888af21fc18d1610545ff6373ee2ecbbb13 (diff) | |
Fix for "Can't place cursor after combining accent"
This patch fixes behavior where attempting to place the cursor at
the end of a string where the last character is a combining accent
actually placed it before that accent. This was especially annoying
for editing Thai text, because it made it difficult to delete a
trailing tone mark.
Fixes bug 8947569 "Can't place cursor after combining accent" and bug
10398332 "[Thailand] Thai Language(IME) -- Can't delete Thai tone mark
while writing message"
Change-Id: Ida1933c8f0ab6cdb0200db39891e9389e4bdba86
Diffstat (limited to 'core/java/android/text/Layout.java')
| -rw-r--r-- | core/java/android/text/Layout.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/text/Layout.java b/core/java/android/text/Layout.java index a6e8c7032eaf..9dfd3837d0f8 100644 --- a/core/java/android/text/Layout.java +++ b/core/java/android/text/Layout.java @@ -1115,7 +1115,7 @@ public abstract class Layout { float dist = Math.abs(getPrimaryHorizontal(max) - horiz); - if (dist < bestdist) { + if (dist <= bestdist) { bestdist = dist; best = max; } |
