terminal icon indicating copy to clipboard operation
terminal copied to clipboard

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

Open dgloverproofpoint opened this issue 1 year ago • 3 comments

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 avatar Feb 14 '24 16:02 dgloverproofpoint

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.

github-actions[bot] avatar Feb 14 '24 16:02 github-actions[bot]

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.

lhecker avatar Feb 14 '24 20:02 lhecker

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 avatar Feb 14 '24 23:02 carlos-zamora

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.

akantak avatar Mar 27 '24 13:03 akantak