[PR #4596] [MERGED] Fix duplicate copyOnSelect when clicking on an unfocused terminal #25855

Open
opened 2026-01-31 09:12:15 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/4596
Author: @leonMSFT
Created: 2/14/2020
Status: Merged
Merged: 2/20/2020
Merged by: @undefined

Base: masterHead: dev/lelian/copyonselectdupe


📝 Commits (2)

  • 22e1037 Fix duplicate copyOnSelect when clicking on an unfocused terminal
  • 4b86e37 moving where my stuff is initialized

📊 Changes

2 files changed (+21 additions, -10 deletions)

View changed files

📝 src/cascadia/TerminalControl/TermControl.cpp (+19 -9)
📝 src/cascadia/TerminalControl/TermControl.h (+2 -1)

📄 Description

Summary of the Pull Request

Currently, clicking on an unfocused terminal with a selection active will trigger copyOnSelect. This is because the check for copyOnSelect and copying to the clipboard is bound to when the Pointer is released. This works fine for when a user performs a click-drag selection, but it inadvertently also triggers when the user performs a single click on an unfocused terminal. We expect copyOnSelect to trigger only on the first time a selection is completed.

This PR will allow the user to single click on an unfocused terminal that has a selection active without triggering a copyOnSelect. It also ensures that any click-drag selection, whether it's on an unfocused or focused terminal, will trigger copyOnSelect.

PR Checklist

Validation Steps Performed

Performed manual testing involving permutations of multiple panes, tabs, in focus, and out of focus.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/4596 **Author:** [@leonMSFT](https://github.com/leonMSFT) **Created:** 2/14/2020 **Status:** ✅ Merged **Merged:** 2/20/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/lelian/copyonselectdupe` --- ### 📝 Commits (2) - [`22e1037`](https://github.com/microsoft/terminal/commit/22e1037a32976e230aab65ab7b9e63f93ceb3ce6) Fix duplicate copyOnSelect when clicking on an unfocused terminal - [`4b86e37`](https://github.com/microsoft/terminal/commit/4b86e37a2847bdf947d59c6b3356eb2ac2b56bfb) moving where my stuff is initialized ### 📊 Changes **2 files changed** (+21 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+19 -9) 📝 `src/cascadia/TerminalControl/TermControl.h` (+2 -1) </details> ### 📄 Description ## Summary of the Pull Request Currently, clicking on an unfocused terminal with a selection active will trigger `copyOnSelect`. This is because the check for `copyOnSelect` and copying to the clipboard is bound to when the Pointer is released. This works fine for when a user performs a click-drag selection, but it inadvertently also triggers when the user performs a single click on an unfocused terminal. We expect `copyOnSelect` to trigger only on the first time a selection is completed. This PR will allow the user to single click on an unfocused terminal that has a selection active without triggering a copyOnSelect. It also ensures that any click-drag selection, whether it's on an unfocused or focused terminal, will trigger copyOnSelect. ## PR Checklist * [x] Closes #4255 ## Validation Steps Performed Performed manual testing involving permutations of multiple panes, tabs, in focus, and out of focus. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:12:15 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25855