[PR #5855] [MERGED] Stop trying to set selection endpoints when there's no selection #26508

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/5855
Author: @DHowett-MSFT
Created: 5/12/2020
Status: Merged
Merged: 5/12/2020
Merged by: @DHowett-MSFT

Base: masterHead: dev/duhowett/who_would_use_a_terminal_like_this_anyway,_i_ask_you


📝 Commits (1)

  • faf9581 Don't let selection endpoints be set when there's no selection

📊 Changes

2 files changed (+12 additions, -0 deletions)

View changed files

📝 src/cascadia/TerminalControl/TermControl.cpp (+5 -0)
📝 src/cascadia/TerminalCore/TerminalSelection.cpp (+7 -0)

📄 Description

Apparently, this accounts for somewhere between 7% and 14% of our
crashes on 1.0RC1.

Summary of the Pull Request

It turns out that we weren't really adequately guarding calls to SetSelectionEnd and friends.

PR Checklist

  • Closes internal crash report
  • CLA
  • Tests passed
  • Requires documentation to be updated
  • One with the corefolk

Detailed Description of the Pull Request / Additional comments

I decided that it would be prudent to add a WIL log.

Validation Steps Performed

First, I figured out how the heck to repro this. Snap the window, begin a selection, then use Win+Up to resize it. Then, I fixed it and tried the repro again.


🔄 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/5855 **Author:** [@DHowett-MSFT](https://github.com/DHowett-MSFT) **Created:** 5/12/2020 **Status:** ✅ Merged **Merged:** 5/12/2020 **Merged by:** [@DHowett-MSFT](https://github.com/DHowett-MSFT) **Base:** `master` ← **Head:** `dev/duhowett/who_would_use_a_terminal_like_this_anyway,_i_ask_you` --- ### 📝 Commits (1) - [`faf9581`](https://github.com/microsoft/terminal/commit/faf9581c85253648267908702dc32215c05a4da7) Don't let selection endpoints be set when there's no selection ### 📊 Changes **2 files changed** (+12 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+5 -0) 📝 `src/cascadia/TerminalCore/TerminalSelection.cpp` (+7 -0) </details> ### 📄 Description Apparently, this accounts for somewhere between 7% and 14% of our crashes on 1.0RC1. ## Summary of the Pull Request It turns out that we weren't really adequately guarding calls to SetSelectionEnd and friends. ## PR Checklist * [x] Closes internal crash report * [x] CLA * [x] Tests passed * [ ] Requires documentation to be updated * [x] One with the corefolk ## Detailed Description of the Pull Request / Additional comments I decided that it would be prudent to add a WIL log. ## Validation Steps Performed First, I figured out how the heck to repro this. Snap the window, begin a selection, then use <kbd>Win+Up</kbd> to resize it. Then, I fixed it and tried the repro again. --- <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:16:29 +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#26508