-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid generating extra formatted copies when no action specific `copy…
…Formatting` is set (#16480) Avoid generating extra formatted copies when action's `copyFormatting` is not present and globally set `copyFormatting` is used. Previously, when the action's `copyFormatting` wasn't set we deferred the decision of which formats needed to be copied to the `TerminalPage::CopyToClipboard` handler. This meant we needed to copy the text in all the available formats and pass it to the handler to copy the required formats after querying the global `copyFormatting`. To avoid making extra copies, we'll store the global `copyFormatting` in TerminalSettings and pass it down to `TermControl`. If `ControlCore::CopySelectionToClipboard()` doesn't receive action specific `copyFormatting`, it will fall back to the global one _before generating the texts_. ## Validation Steps Performed - no `copyFormatting` set for the copy action: Copies formats according to the global `copyFormatting`. - `copyFormatting` is set for the copy action: Copies formats according to the action's `copyFormatting`.
- Loading branch information
Showing
6 changed files
with
15 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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