Skip to content
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

Add docs for "Copy with control sequences" functionality #756

Merged

Conversation

FuegoFro
Copy link
Contributor

Copy link

Learn Build status updates of commit 773e827:

✅ Validation status: passed

File Status Preview URL Details
TerminalDocs/customize-settings/actions.md ✅Succeeded View
TerminalDocs/selection.md ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

@FuegoFro
Copy link
Contributor Author

@microsoft-github-policy-service agree

@mattwojo mattwojo added the futureRelease This is releated to a future version that has not yet been release via Microsoft Store label Apr 15, 2024
@nguyen-dows
Copy link
Collaborator

We will revisit this PR this after microsoft/terminal#17059 gets merged in main.

lhecker pushed a commit to microsoft/terminal that referenced this pull request Nov 20, 2024
## Summary of the Pull Request

This extends the copy command to be able to include control sequences,
for use in tools that subsequently know how to parse and display that.

## References and Relevant Issues

#15703

## Detailed Description of the Pull Request / Additional comments

At a high level, this:
- Expands the `CopyTextArgs` to have a `withControlSequences` bool.
- Plumbs that bool down through many layers to where we actuall get
  data out of the text buffer.
- Modifies the existing `TextBuffer::Serialize` to be more generic
  and renames it to `TextBuffer::ChunkedSerialize`.
- Uses the new `ChunkedSerialize` to generate the data for the copy
  request.

## Validation Steps Performed

To test this I've manually:
- Generated some styled terminal contents, copied it with the control
  sequences, pasted it into a file, `cat`ed the file and seen that it
  looks the same.
- Set `"firstWindowPreference": "persistedWindowLayout"` and
  validated that the contents of windows are saved and
  restored with styling intact.

I also checked that `Invoke-OpenConsoleTests` passed.

## PR Checklist
- [x] Closes #15703
- [ ] Tests added/passed
- [x] Documentation updated
- If checked, please file a pull request on [our docs
repo](https://github.com/MicrosoftDocs/terminal) and link it here:
MicrosoftDocs/terminal#756
- [x] Schema updated (if necessary)
@FuegoFro
Copy link
Contributor Author

Just wanted to note that microsoft/terminal#17059 recently did get merged in main 😊

@nguyen-dows
Copy link
Collaborator

@FuegoFro And so will this PR in a few minutes! Thanks for the work on this, Danny! :D

@nguyen-dows nguyen-dows merged commit 16b50e9 into MicrosoftDocs:main Nov 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
futureRelease This is releated to a future version that has not yet been release via Microsoft Store
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants