Skip to content

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

@vfonic

Description

@vfonic

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,

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code Insidersterminal-findRelating the terminal's find widgetverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions