commit | 8a2c888acc4d52b4d01f20ed2137ea35f08d6ba1 | [log] [tgz] |
---|---|---|
author | Tessa Nijssen <tnijssen@google.com> | Tue Jul 24 20:18:47 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Jul 24 20:18:47 2018 |
tree | bba65bc8f35a0b48f7f7ec4d7565e47a0f12f981 | |
parent | 1bfea40e6df22fa648ab72e8b642ba63ef3c8fbf [diff] |
[Mac] Text Suggestion Selection Replaces Trailing Whitespace When the user selects a text suggestion from the SuggestedTextTouchBar, the string returned by AppKit API has the necessary trailing whitespace. Currently, when the current editing word is replaced, AppKit's whitespace is added alongside the existing trailing whitespace. This change includes whitespace after a word or the current cursor position into the editing word range. Then, when the editing word is replaced, or the suggestion's text is placed at the cursor, the existing trailing whitespace is also replaced with the suggestion's trailing whitespace. The EditingWordRangeTest in SuggestedTextTouchBarControllerUnitTests was split into multiple tests. A test case was added, WhitespaceEditingWordRangeTest, to test that editingWordRangeFromText:cursorPosition: properly calculates the editing word range as it moves through non-word characters. Existing test cases were modified to reflect the new behavior with regards to trailing whitespace characters. Bug: 717553 Change-Id: Ie0116fc6802ede203dd2adeb691789fa1e4719f3 Reviewed-on: https://chromium-review.googlesource.com/1147335 Reviewed-by: Avi Drissman <avi@chromium.org> Reviewed-by: Sarah Chan <spqchan@chromium.org> Commit-Queue: Tessa Nijssen <tnijssen@google.com> Cr-Commit-Position: refs/heads/master@{#577658}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .