[PR #6322] [MERGED] Implement Shift+MultiClick Selection Expansion #26642

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/6322
Author: @carlos-zamora
Created: 6/3/2020
Status: Merged
Merged: 6/25/2020
Merged by: @undefined

Base: masterHead: dev/cazamor/sln/shift-multiclick


📝 Commits (9)

  • ef68623 Add Proper Shift+MultiClick Selection Expansion
  • 7160223 add tests for shift clicks and pivots
  • 186d0f9 make my code look good
  • 4f44d5d add a lambda for multi-click selections
  • 519fb27 Revert "add a lambda for multi-click selections"
  • 0b8e560 a better refactor
  • 3fdbbda make this a bit cleaner
  • 685bd8a Merge branch 'master' into dev/cazamor/sln/shift-multiclick
  • 8dc5a1d fix shift+click+drag bug. Add more tests

📊 Changes

4 files changed (+219 additions, -24 deletions)

View changed files

📝 src/cascadia/TerminalControl/TermControl.cpp (+27 -19)
📝 src/cascadia/TerminalCore/Terminal.hpp (+1 -1)
📝 src/cascadia/TerminalCore/TerminalSelection.cpp (+22 -4)
📝 src/cascadia/UnitTests_TerminalCore/SelectionTest.cpp (+169 -0)

📄 Description

This pull request implements shift+double/triple click. Proper behavior
(as described in #4557) is to only expand one selection point, not both.

Adding the bool targetStart was a bit weird. I decided on this being
the cleanest approach though because I still want PivotSelection to be
its own helper function. Otherwise, the concept of "pivoting" gets kinda
messy.

Validation Steps Performed

Manual testing as described on attached issue.
Tests were added for Shift+Click and pivoting the selection too.

Closes #4557


🔄 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/6322 **Author:** [@carlos-zamora](https://github.com/carlos-zamora) **Created:** 6/3/2020 **Status:** ✅ Merged **Merged:** 6/25/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/cazamor/sln/shift-multiclick` --- ### 📝 Commits (9) - [`ef68623`](https://github.com/microsoft/terminal/commit/ef686238744acfb12236371ffc1d6e865f743a4e) Add Proper Shift+MultiClick Selection Expansion - [`7160223`](https://github.com/microsoft/terminal/commit/71602235e0b17154ba327f6d2886757c135c185a) add tests for shift clicks and pivots - [`186d0f9`](https://github.com/microsoft/terminal/commit/186d0f965d3a69e3c98111778dc2835a5a96708f) make my code look good - [`4f44d5d`](https://github.com/microsoft/terminal/commit/4f44d5d08c477a683f21775aa3101b311feb62a4) add a lambda for multi-click selections - [`519fb27`](https://github.com/microsoft/terminal/commit/519fb279f6735ead3c24fcd30a158f98c873f8c5) Revert "add a lambda for multi-click selections" - [`0b8e560`](https://github.com/microsoft/terminal/commit/0b8e5608b0ab56237258fef3f868dd464c1095d6) a better refactor - [`3fdbbda`](https://github.com/microsoft/terminal/commit/3fdbbdaabef0b72b9e9b8e6d41cc487342bed8a2) make this a bit cleaner - [`685bd8a`](https://github.com/microsoft/terminal/commit/685bd8aeab97303898844441c9a354e01c93a37f) Merge branch 'master' into dev/cazamor/sln/shift-multiclick - [`8dc5a1d`](https://github.com/microsoft/terminal/commit/8dc5a1dda61525b6d7c389fb38ddafb6faf7db8d) fix shift+click+drag bug. Add more tests ### 📊 Changes **4 files changed** (+219 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+27 -19) 📝 `src/cascadia/TerminalCore/Terminal.hpp` (+1 -1) 📝 `src/cascadia/TerminalCore/TerminalSelection.cpp` (+22 -4) 📝 `src/cascadia/UnitTests_TerminalCore/SelectionTest.cpp` (+169 -0) </details> ### 📄 Description This pull request implements shift+double/triple click. Proper behavior (as described in #4557) is to only expand one selection point, not both. Adding the `bool targetStart` was a bit weird. I decided on this being the cleanest approach though because I still want `PivotSelection` to be its own helper function. Otherwise, the concept of "pivoting" gets kinda messy. ## Validation Steps Performed Manual testing as described on attached issue. Tests were added for Shift+Click and pivoting the selection too. Closes #4557 --- <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:17:18 +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#26642