-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Pasted text copied from an interactive terminal should retain colors #20813
Comments
Opening this up for PRs. @rebornix any tips/links to help someone implement this would be useful. |
It's all about setting a https://github.com/sourcelair/xterm.js/blob/3a6368ba6c8d5029e1b432f0e32845442d2f26d9/src/handlers/Clipboard.ts#L48 Here is where you can start to tweak. |
@rebornix vscode intercepts copy/paste so the xterm.js stuff is skipped. See https://github.com/Microsoft/vscode/blob/76787cdff259873e24f38ec6e195095908037a82/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts#L292 |
@Tyriar we intercepts the key shortcuts but after running |
Supporting this now would need hooks from upstream due to canvas. |
Any news about this? (or a workaround?) it's pretty annoying when you have to forward terminal output with colored build logs and you can't.. |
Added help wanted as this is blocked on contributions to xterm.js in xtermjs/xterm.js#1883 |
Steps to Reproduce:
Now that copied text from an editor pane retains syntax highlighting when pasted into a rich editor, is it possible that we could get the same behavior for copying text from the integrated terminal? I'll understand if this isn't easy to accomplish, but I know that former users of PowerShell ISE will expect it since that editor provides this capability.
/cc @rebornix @Tyriar
The text was updated successfully, but these errors were encountered: