question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Terminal: Copy on selection + new highlight in 1.68 copies previous term on CMD+F

See original GitHub issue

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.68.0 (this issue didn’t exist on 1.67.2)
  • OS Version: macOS Monterey 12.3.1

Steps to Reproduce:

  1. In settings.json enable: "terminal.integrated.copyOnSelection": true,
  2. Open integrated terminal
  3. Search for some term that exists in the terminal (that will be highlighted/selected)
  4. Focus on editor and type + copy some chunk of text
  5. Focus on terminal, press CMD+F and paste what you just copied

Expected:

The pasted term is the term you just copied

Actual:

The pasted term is the term you last searched for (in step 3).

Why this happens?

Because:

  1. When you press CMD+F in terminal, the terminal has pre-existing term typed in the search box (from your first search)
  2. Terminal uses this term to highlight all occurrences of such term in the terminal
  3. Highlighting the terms makes the terminal also copy this term to clipboard due to "terminal.integrated.copyOnSelection": true,

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:2
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
joelhockcommented, Jul 11, 2022

My two cents is that even when find is explicitly triggered, a found selection’s text should not be copied to the clipboard–maybe that’s an easier fix?

0reactions
krasi-georgievcommented, Nov 28, 2022

What is the current status? Abandoned or added to a milestone?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enable Copy on Select in Windows Terminal - Jack of all Admins
Copy on select, immediately copying any text you highlight to the clipboard, is not enabled by default. Luckily, this can easily be remediated ......
Read more >
Hotkey/menu to select-all and copy text in the Windows ...
The new hotkey is Ctrl + Shift + A as shown in the Command Palette below, and then one can use the usual...
Read more >
May 2022 (version 1.68) - Visual Studio Code
Welcome to the May 2022 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some...
Read more >
Visual Studio Code is showing the last command ran on the ...
So I highlight a selection, do F8, it shows the selection on the console line, shows the results from the run, and then...
Read more >
Windows Terminal Interaction Settings | Microsoft Learn
Automatically copy selection to clipboard · Text format when copying · Remove trailing white-space in rectangular selection · Trim trailing ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found