[PR #2152] [MERGED] Added CopyOnSelect as a Global Setting #24834

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/2152
Author: @carlos-zamora
Created: 7/30/2019
Status: ✅ Merged
Merged: 8/20/2019
Merged by: @undefined

Base: master ← Head: dev/cazamor/copy-on-select


📝 Commits (10+)

  • dc0ff1a Added CopyOnSelect as a ControlSetting
  • 1d8b88b Updated doc
  • f5d8493 Updated doc
  • e5078ad CopyOnSelect feature changes (like, overall)
  • 02c0472 Made CopyOnSelect a CoreSetting
  • c0ee9b7 Merge branch 'master' into dev/cazamor/copy-on-select
  • 83ecab9 Merge branch 'master' into dev/cazamor/copy-on-select
  • 3405d9f Refactor a bit.
  • 3871c10 CopyOnSelect Tests
  • fb082c9 Merge branch 'master' into dev/cazamor/copy-on-select

📊 Changes

12 files changed (+185 additions, -28 deletions)

View changed files

📝 doc/cascadia/SettingsSchema.md (+1 -0)
📝 src/cascadia/TerminalApp/GlobalAppSettings.cpp (+20 -1)
📝 src/cascadia/TerminalApp/GlobalAppSettings.h (+4 -0)
📝 src/cascadia/TerminalControl/TermControl.cpp (+42 -25)
📝 src/cascadia/TerminalCore/Terminal.cpp (+4 -0)
📝 src/cascadia/TerminalCore/Terminal.hpp (+4 -0)
📝 src/cascadia/TerminalCore/TerminalSelection.cpp (+34 -2)
📝 src/cascadia/TerminalSettings/ICoreSettings.idl (+1 -0)
📝 src/cascadia/TerminalSettings/TerminalSettings.cpp (+11 -0)
📝 src/cascadia/TerminalSettings/terminalsettings.h (+3 -0)
📝 src/cascadia/UnitTests_TerminalCore/MockTermSettings.h (+3 -0)
📝 src/cascadia/UnitTests_TerminalCore/SelectionTest.cpp (+58 -0)

📄 Description

Summary of the Pull Request

Introduces the "copyOnSelect" setting to "globals" as a boolean type. When set to true, a selection is immediately copied to your clipboard upon creation. When set to false, the selection persists and awaits further action.

PR Checklist

Detailed Description of the Pull Request / Additional comments

Standard "added a new global setting" changes
TermControl's PointerReleased event is updated to support a mouse button release event. Just hooked up the copy function right there.

Validation Steps Performed

  • copyOnSelect = true
    • make selection
    • right click to paste (selection persists)
    • Works! ✔
  • copyOnSelect = true
    • make selection
    • right click to paste
    • left click on a cell
    • right click to paste
    • same data should be pasted twice
    • Works! ✔
  • copyOnSelect = true
    • click on a cell (no selection)
    • drag to another cell (selection visible)
    • drag back to first cell (selection should persist, but should only cover one cell)
    • Works! ✔
  • copyOnSelect = false
    • make selection
    • selection persists
    • right click to copy (selection disappears)
    • right click to paste
    • Works! ✔

🔄 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/2152 **Author:** [@carlos-zamora](https://github.com/carlos-zamora) **Created:** 7/30/2019 **Status:** ✅ Merged **Merged:** 8/20/2019 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/cazamor/copy-on-select` --- ### 📝 Commits (10+) - [`dc0ff1a`](https://github.com/microsoft/terminal/commit/dc0ff1a1ad1750de1e6ac4ca32ef29a7b9d26153) Added CopyOnSelect as a ControlSetting - [`1d8b88b`](https://github.com/microsoft/terminal/commit/1d8b88bf5fbb2df7e56c2eb7b660009a01081bd3) Updated doc - [`f5d8493`](https://github.com/microsoft/terminal/commit/f5d84932a3257f6fe87888888a8f705f9b24cb97) Updated doc - [`e5078ad`](https://github.com/microsoft/terminal/commit/e5078ad73656bf90aa2def379b83eee7a512b811) CopyOnSelect feature changes (like, overall) - [`02c0472`](https://github.com/microsoft/terminal/commit/02c04725b7b1f66c0d2723ba54fd3863249b5782) Made CopyOnSelect a CoreSetting - [`c0ee9b7`](https://github.com/microsoft/terminal/commit/c0ee9b7fb47fb63e8abe43f977abd6e387e601ce) Merge branch 'master' into dev/cazamor/copy-on-select - [`83ecab9`](https://github.com/microsoft/terminal/commit/83ecab97850e194bc7ea8653e862e69bc3581a26) Merge branch 'master' into dev/cazamor/copy-on-select - [`3405d9f`](https://github.com/microsoft/terminal/commit/3405d9f6b88f5a784ed6e64d6fa1f4ff770b62ff) Refactor a bit. - [`3871c10`](https://github.com/microsoft/terminal/commit/3871c104b296ffbb335e8898f94bd6bd0aa4f4cd) CopyOnSelect Tests - [`fb082c9`](https://github.com/microsoft/terminal/commit/fb082c9f4d56d905238ffef8845ad69bf262ffd7) Merge branch 'master' into dev/cazamor/copy-on-select ### 📊 Changes **12 files changed** (+185 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `doc/cascadia/SettingsSchema.md` (+1 -0) 📝 `src/cascadia/TerminalApp/GlobalAppSettings.cpp` (+20 -1) 📝 `src/cascadia/TerminalApp/GlobalAppSettings.h` (+4 -0) 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+42 -25) 📝 `src/cascadia/TerminalCore/Terminal.cpp` (+4 -0) 📝 `src/cascadia/TerminalCore/Terminal.hpp` (+4 -0) 📝 `src/cascadia/TerminalCore/TerminalSelection.cpp` (+34 -2) 📝 `src/cascadia/TerminalSettings/ICoreSettings.idl` (+1 -0) 📝 `src/cascadia/TerminalSettings/TerminalSettings.cpp` (+11 -0) 📝 `src/cascadia/TerminalSettings/terminalsettings.h` (+3 -0) 📝 `src/cascadia/UnitTests_TerminalCore/MockTermSettings.h` (+3 -0) 📝 `src/cascadia/UnitTests_TerminalCore/SelectionTest.cpp` (+58 -0) </details> ### 📄 Description ## Summary of the Pull Request Introduces the "copyOnSelect" setting to "globals" as a boolean type. When set to `true`, a selection is immediately copied to your clipboard upon creation. When set to `false`, the selection persists and awaits further action. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #524 * [x] CLA signed * [x] Tests ~added/passed~ not necessary * [x] Requires documentation to be updated * [x] I am a core contributor <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments Standard "added a new global setting" changes `TermControl`'s `PointerReleased` event is updated to support a mouse button release event. Just hooked up the copy function right there. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed - `copyOnSelect` = true - make selection - right click to paste (selection persists) - Works! ✔ - `copyOnSelect` = true - make selection - right click to paste - left click on a cell - right click to paste - same data should be pasted twice - Works! ✔ - `copyOnSelect` = true - click on a cell (no selection) - drag to another cell (selection visible) - drag back to first cell (selection should persist, but should only cover one cell) - Works! ✔ - `copyOnSelect` = false - make selection - selection persists - right click to copy (selection disappears) - right click to paste - Works! ✔ --- <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:05:37 +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#24834