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

Rewrite the copy-to-clipboard functionality to use the Win32 functions #16715

Open
dgloverproofpoint opened this issue Feb 14, 2024 · 4 comments
Labels
Area-Interaction Interacting with the vintage console window (as opposed to driving via API or hooks) Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.
Milestone

Comments

@dgloverproofpoint
Copy link

Windows Terminal version

1.18.10301.0

Windows build number

10.0.19045.3930

Other Software

No response

Steps to reproduce

  1. Select output
  2. [CTRL + C] or [right click] or [CTRL + Shift + P (command palette -> "Copy Text" option]
  3. Neither [CTRL + V] pastes nor does [Win + V] have the selected and presumably copied text in the clipboard

Expected Behavior

Expecting copy from terminal into Windows Clipboard and paste into other programs to work as normal.

Actual Behavior

No text copied to clipboard. I can, at times, get it to continue functionality if I un-snap the Windows Terminal window from fullscreen view but this is only intermittently successful.

This happens whether my shell is ssh'ed to another machine or running locally.

Other programs continue to copy to clipboard and paste to other programs perfectly fine.

@dgloverproofpoint dgloverproofpoint added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Feb 14, 2024
Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@dgloverproofpoint dgloverproofpoint changed the title Copying from Windows Terminal (v. 1.18.10301.0) is not copying to clipboard precluding selected text from pasting to other programs Copying from Windows Terminal (v. 1.18.10301.0) is not reliably copying to clipboard precluding selected text from pasting to other programs Feb 14, 2024
@lhecker
Copy link
Member

lhecker commented Feb 14, 2024

Maybe we need to rewrite the copy-to-clipboard functionality to use the Win32 functions as well. But 's fairly likely that your machine is having issues right now, like background applications trying to acquire the clipboard lock all the time, etc. May be worth trying to reboot / exiting all background applications, just in case.

@carlos-zamora
Copy link
Member

Thanks for filing. Per Leonard's comment above, we'll repurpose this issue to track rewriting the clipboard code to use Win32 functions.

@carlos-zamora carlos-zamora changed the title Copying from Windows Terminal (v. 1.18.10301.0) is not reliably copying to clipboard precluding selected text from pasting to other programs Rewrite the copy-to-clipboard functionality to use the Win32 functions Feb 14, 2024
@carlos-zamora carlos-zamora added Area-Interaction Interacting with the vintage console window (as opposed to driving via API or hooks) Product-Terminal The new Windows Terminal. Issue-Task It's a feature request, but it doesn't really need a major design. and removed Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Feb 14, 2024
@carlos-zamora carlos-zamora added this to the Backlog milestone Feb 14, 2024
@akantak
Copy link

akantak commented Mar 27, 2024

Same here on Terminal Windows Version: 1.19.10573.0 and Windows 11 23H2 OS Build 22631.3296.
The copy mechanism from the terminal randomly stops/starts working. It has been happening for a few weeks now.
I would appreciate any workaround (if any known). For now, it is only waiting until it randomly starts working once again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Interaction Interacting with the vintage console window (as opposed to driving via API or hooks) Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

4 participants