Skip to content

Fix LT-21981: Pasted text retains writing system #368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 19, 2025
Merged

Conversation

jtmaxwell3
Copy link
Collaborator

@jtmaxwell3 jtmaxwell3 commented Jun 11, 2025

I added ReplaceExternalWritingSystems, which replaces writing systems in the pasted text that are not in cache.LanguageProject.AllWritingSystems with the writing system of the selection. This fixes the given test case.

This only works when PasteClipboard is called with an LcmCache argument. EditingHelper doesn't have its own LcmCache, and many of the places that create EditingHelper don't have their own LcmCache. EditingHelper.HandleOnKeyDown calls PasteClipboard without an LcmCache argument. I don't know when oftenHandleOnKeyDown is invoked.


This change is Reviewable

Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @jtmaxwell3)

@jtmaxwell3 jtmaxwell3 merged commit 29a1524 into release/9.3 Jun 19, 2025
5 checks passed
@jtmaxwell3 jtmaxwell3 deleted the LT-21981 branch June 19, 2025 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants