[PR #1197] [MERGED] Double and Triple Click Selection #24516

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/1197
Author: @carlos-zamora
Created: 6/10/2019
Status: Merged
Merged: 7/12/2019
Merged by: @carlos-zamora

Base: masterHead: dev/cazamor/multi-click-selection


📝 Commits (10+)

  • aea8dc8 Double and Triple Click Selection
  • 27dab77 PR Changes
  • b70157b merge to before clang format
  • df0f1a2 Merge remote-tracking branch 'origin/master' into dev/cazamor/multi-click-selection
  • f210bef code formatting
  • c244e5d PR changes + format
  • a12f727 PR changes
  • 6cef7ce Merge branch 'master' into dev/cazamor/multi-click-selection
  • 7249067 PR Changes
  • 3e7f78b Multi-Click Selection: Double-Click Settings (#1273)

📊 Changes

13 files changed (+252 additions, -10 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 (+61 -9)
📝 src/cascadia/TerminalControl/TermControl.h (+10 -0)
📝 src/cascadia/TerminalCore/Terminal.cpp (+2 -0)
📝 src/cascadia/TerminalCore/Terminal.hpp (+7 -0)
📝 src/cascadia/TerminalCore/TerminalSelection.cpp (+128 -0)
📝 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/ScreenSizeLimitsTest.cpp (+2 -0)
📝 src/inc/DefaultSettings.h (+2 -0)

📄 Description

Summary of the Pull Request

Initial double click selection works. So a double click will make a selection within some preset delimiters (' ', '/' '\'). The left side excludes the delimiter. The right side includes it.

Initial triple click selection works. Selects the entire line.

The following known issues will be implemented in separate PRs.
Known Issues:

  • ChunkSelection: move mouse after a double/triple click to select next chunk (section between delimiters)
  • Double Click Settings (#1273 ): configurable delimiters, enable chunk selection, set bounds as inclusive/exclusive

References

#1084 Screenshot Selection: one step closer to this. Now just need to create it and attach it as a configurable option to triple click
#988 Double Click Selection: needs ChunkSelection + Settings before completion
#989 Triple Click Selection: needs ChunkSelection + Settings before completion

PR Checklist

  • Doesn't close issue. Please read above.
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

TermControl Changes

  • Actually detect Double and Triple Click.
  • TIMESTAMP created to keep track of time delta for double/triple click (couldn't find a XAML way to do this :( )

Terminal Changes

  • Triple Click:
    • pretty straightforward. No delimiter check necessary.
  • Double Click:
    • if double click a delimiter, just select that spot
    • otherwise, expand selection to the left and right (each have their own function)
    • Delimiter check hardcodes space and slashes. This is super temporary because I'll replace it when delimiters are configurable in settings.

Validation Steps Performed

You can actually do most with the header on startup :).

  • Double Click first word in header
  • Double Click any other word in header
  • Triple Click any line

🔄 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/1197 **Author:** [@carlos-zamora](https://github.com/carlos-zamora) **Created:** 6/10/2019 **Status:** ✅ Merged **Merged:** 7/12/2019 **Merged by:** [@carlos-zamora](https://github.com/carlos-zamora) **Base:** `master` ← **Head:** `dev/cazamor/multi-click-selection` --- ### 📝 Commits (10+) - [`aea8dc8`](https://github.com/microsoft/terminal/commit/aea8dc8c53678d86f48f2954f3a5d25a6f2641a9) Double and Triple Click Selection - [`27dab77`](https://github.com/microsoft/terminal/commit/27dab7770124de91124e9963b4d33e094bc85ad4) PR Changes - [`b70157b`](https://github.com/microsoft/terminal/commit/b70157b75b69d73624f4405016ae0161889c4d28) merge to before clang format - [`df0f1a2`](https://github.com/microsoft/terminal/commit/df0f1a27be4af87cac4d6b8e676ee7dc38f648c3) Merge remote-tracking branch 'origin/master' into dev/cazamor/multi-click-selection - [`f210bef`](https://github.com/microsoft/terminal/commit/f210bef378442fc3d178a67a8b4664a5dcce3644) code formatting - [`c244e5d`](https://github.com/microsoft/terminal/commit/c244e5da26f10f8605cfaf92dd21a7affc623997) PR changes + format - [`a12f727`](https://github.com/microsoft/terminal/commit/a12f7275df7b2c2cc44155907a78fbbc3feff06c) PR changes - [`6cef7ce`](https://github.com/microsoft/terminal/commit/6cef7ce9c7c4a8749799a55c72cd9373eb9ab62a) Merge branch 'master' into dev/cazamor/multi-click-selection - [`7249067`](https://github.com/microsoft/terminal/commit/7249067bc7a89b926baeb8d8fce7f2300781bb92) PR Changes - [`3e7f78b`](https://github.com/microsoft/terminal/commit/3e7f78bd59b03e688cc1bfb56b79888b5d270765) Multi-Click Selection: Double-Click Settings (#1273) ### 📊 Changes **13 files changed** (+252 additions, -10 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` (+61 -9) 📝 `src/cascadia/TerminalControl/TermControl.h` (+10 -0) 📝 `src/cascadia/TerminalCore/Terminal.cpp` (+2 -0) 📝 `src/cascadia/TerminalCore/Terminal.hpp` (+7 -0) 📝 `src/cascadia/TerminalCore/TerminalSelection.cpp` (+128 -0) 📝 `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/ScreenSizeLimitsTest.cpp` (+2 -0) 📝 `src/inc/DefaultSettings.h` (+2 -0) </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Initial double click selection works. So a double click will make a selection within some preset delimiters (' ', '/' '\\'). The left side excludes the delimiter. The right side includes it. Initial triple click selection works. Selects the entire line. The following known issues will be implemented in separate PRs. Known Issues: * [ ] **ChunkSelection**: move mouse after a double/triple click to select next chunk (section between delimiters) * [x] **Double Click Settings** (#1273 ): configurable delimiters, enable chunk selection, set bounds as inclusive/exclusive <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References #1084 **Screenshot Selection**: one step closer to this. Now just need to create it and attach it as a configurable option to triple click #988 **Double Click** Selection: needs ChunkSelection + Settings before completion #989 **Triple Click Selection**: needs ChunkSelection + Settings before completion <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Doesn't close issue. Please read above. * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [x] Requires documentation to be updated * [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx <!-- 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 **TermControl Changes** - Actually detect Double and Triple Click. - TIMESTAMP created to keep track of time delta for double/triple click (couldn't find a XAML way to do this :( ) **Terminal Changes** - Triple Click: - pretty straightforward. No delimiter check necessary. - Double Click: - if double click a delimiter, just select that spot - otherwise, expand selection to the left and right (each have their own function) - Delimiter check hardcodes space and slashes. This is super temporary because I'll replace it when delimiters are configurable in settings. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed You can actually do most with the header on startup :). * [ ] Double Click first word in header * [ ] Double Click any other word in header * [ ] Triple Click any line --- <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:03:46 +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#24516