[PR #4404] [MERGED] selection: Shift-Click to set endpoint, clear & discard keypress on ESC #25746

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/4404
Author: @leonMSFT
Created: 1/29/2020
Status: Merged
Merged: 1/31/2020
Merged by: @undefined

Base: masterHead: dev/lelian/ShiftClickSelectionEnd


📝 Commits (1)

  • 8205ee1 shift click selection end works, clear selection and discard key press for esc works

📊 Changes

1 file changed (+21 additions, -3 deletions)

View changed files

📝 src/cascadia/TerminalControl/TermControl.cpp (+21 -3)

📄 Description

This PR addresses the following two issues:

#4203: If a selection is active, a shift-LeftClick will set the SelectionEnd to where the pointer is.
#3911: Currently, any keypress will clear selection, and will pass through to the terminal. This PR will make it so that if a selection is active, any keypress will clear the selection and then any keypress except esc will pass through to the terminal.

PR Checklist

Validation Steps Performed

Played around a whole bunch with shift-clicking selections and regular clicking selections.
Also played around with selections and dismissing with all sorts of keypresses and keychords.
Tests all pass still!


🔄 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/4404 **Author:** [@leonMSFT](https://github.com/leonMSFT) **Created:** 1/29/2020 **Status:** ✅ Merged **Merged:** 1/31/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/lelian/ShiftClickSelectionEnd` --- ### 📝 Commits (1) - [`8205ee1`](https://github.com/microsoft/terminal/commit/8205ee1358360783ac22eed9b87995fa486c1812) shift click selection end works, clear selection and discard key press for esc works ### 📊 Changes **1 file changed** (+21 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+21 -3) </details> ### 📄 Description This PR addresses the following two issues: #4203: If a selection is active, a <kbd>shift</kbd>-LeftClick will set the SelectionEnd to where the pointer is. #3911: Currently, any keypress will clear selection, and will pass through to the terminal. This PR will make it so that if a selection is active, _any_ keypress will clear the selection and then any keypress _except_ <kbd>esc</kbd> will pass through to the terminal. ## PR Checklist * [x] Closes #4203; Closes #3911 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [x] Tests added/passed ## Validation Steps Performed Played around a whole bunch with shift-clicking selections and regular clicking selections. Also played around with selections and dismissing with all sorts of keypresses and keychords. Tests all pass still! --- <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:11:31 +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#25746