[omnibox] [rich-autocompletion] Preserve cursor for split selections.
Split AC was added in CL crrev.com/c/2424985 . It allows e.g. the input 'a c' to match the text 'a [b ]c[ d]' When generating the text selections from word matches, it removes empty matches and merges adjacent matches. E.g. the input 'a b' produces the selections 'a b[ c]' instead of 'a| |b[ c]'. This is desirable usually, but not desirable for the last selection which is used to determine the cursor position; merging or filtering the last selection incorrectly alters the cursor. This CL makes sure to preserve the last selection and, therefore, the correct cursor. E.g. the input 'a c' produces selections 'a [b ]c|' instead of 'a [b ]c'. Bug: 1062446 Change-Id: Icfb13321d86454a8a2fbc89289fefda53287b770 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2601046 Commit-Queue: manuk hovanesian <manukh@chromium.org> Reviewed-by:Orin Jaworski <orinj@chromium.org> Cr-Commit-Position: refs/heads/master@{#839170}
Showing
Please register or sign in to comment