Repository navigation
Conversation
dzfrias
force-pushed
the
macos-delete-surrounding
branch
2 times, most recently
from
October 22, 2026 18:52
8739d32 to
1793f75
Compare
dzfrias
force-pushed
the
macos-delete-surrounding
branch
from
October 26, 2026 04:17
1793f75 to
637e29a
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
macOS now has support for surrounding text. I extended the existing delete surrounding API. Note that there is a difference between what macOS says to do (which is to replace an arbitrary range) and what the API allows (which is to delete bytes before and after the cursor). This means the implementation has to translate between the two.
I tested this using the Japanese Romaji keyboard. Committing a composition, and then typing CTRL-Shift-R deletes some preceding text and reactivates marked text, which involves both
selectedTextandattributedSubstring. I also tested dictation, which worked. Another example of an IME that uses this feature is Zhuyin, but it isn't testable using the IME example program. Eventually I plan to add cursor support toime.rsso that Zhuyin can be tested.changelogmodule if knowledge of this change could be valuable to usersFixes: #3617 (and maybe others)