[PR #5263] Add 'copyFormatting' global setting #26212

Open
opened 2026-01-31 09:14:39 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/5263

State: closed
Merged: Yes


Summary of the Pull Request

Implements copyFormatting as a global setting. When enabled, formatting such as font and foreground/background colors are copied to the clipboard on all copy operations.

Also updates the schema and docs.

References

#5212 - Spec for Formatted Copying
#4191 - Setting to enable/disable formatted copy

This feature will also have an impact on these yet-to-be-implemented features:

  • #5262 - copyFormatting Keybinding Arg for Copy
  • #1553 - Pointer Bindings

PR Checklist

Detailed Description of the Pull Request / Additional comments

We already check if the hstring passed into the clipboard is empty before setting it. So the majority of the changes are actually just adding the global setting in.

Validation Steps Performed

copyFormatting Mouse Copy Keyboard Copy
not set (false)
true
false
**Original Pull Request:** https://github.com/microsoft/terminal/pull/5263 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request Implements `copyFormatting` as a global setting. When enabled, formatting such as font and foreground/background colors are copied to the clipboard on _all_ copy operations. Also updates the schema and docs. ## References #5212 - Spec for Formatted Copying #4191 - Setting to enable/disable formatted copy This feature will also have an impact on these yet-to-be-implemented features: - #5262 - copyFormatting Keybinding Arg for Copy - #1553 - Pointer Bindings ## PR Checklist * [X] Closes #4191 ## Detailed Description of the Pull Request / Additional comments We already check if the hstring passed into the clipboard is empty before setting it. So the majority of the changes are actually just adding the global setting in. ## Validation Steps Performed | `copyFormatting` | Mouse Copy | Keyboard Copy | |--|--|--| | not set (`false`) | ✔ | ✔ | | `true` | ✔ | ✔ | | `false` | ✔ | ✔ |
claunia added the pull-request label 2026-01-31 09:14:39 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#26212