[PR #12208] [MERGED] Don't open a hole in the terminal window when pasting #28896

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/12208
Author: @zadjii-msft
Created: 1/20/2022
Status: Merged
Merged: 1/27/2022
Merged by: @undefined

Base: mainHead: dev/migrie/b/12202-gaping-holes-when-pasting


📝 Commits (2)

  • 5f9c551 this fixes it in a braindead way. Gonna try and clear some of this up though...
  • 685ea89 much cleaner

📊 Changes

4 files changed (+10 additions, -11 deletions)

View changed files

📝 src/cascadia/TerminalApp/TerminalPage.cpp (+3 -8)
📝 src/cascadia/TerminalControl/ControlInteractivity.cpp (+1 -1)
📝 src/cascadia/TerminalControl/EventArgs.h (+5 -2)
📝 src/cascadia/TerminalControl/EventArgs.idl (+1 -0)

📄 Description

Turns out, this bug only repros in Controls version 2. I'm not sure why, but it didn't repro only on main. So this fix does nothing until #11720 merges.

This PR prevents us from setting properties on the paste warning dialog unless we actually need to paste. 5f9c551b7e proves that settings these properties is what would cause the bug in the first place.

I went a step further and cleaned this up a bit. This was always a little weird, having to get the BracketedPasteEnabled for the active control on the UI thread before we actually display the warning. In the post-#5000 future where going back to the control like this would be a x-proc hop, I figured I should just skip that entirely and plumb the BracketedPaste state out in the initial request.

See also: #12241 which would introduce #12202 on its own.


🔄 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/12208 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 1/20/2022 **Status:** ✅ Merged **Merged:** 1/27/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/migrie/b/12202-gaping-holes-when-pasting` --- ### 📝 Commits (2) - [`5f9c551`](https://github.com/microsoft/terminal/commit/5f9c551b7edced4ed72a4b9694998143f96589a3) this fixes it in a braindead way. Gonna try and clear some of this up though... - [`685ea89`](https://github.com/microsoft/terminal/commit/685ea899ca9bcf3dd695f2a5650e5b399f9b34b7) much cleaner ### 📊 Changes **4 files changed** (+10 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+3 -8) 📝 `src/cascadia/TerminalControl/ControlInteractivity.cpp` (+1 -1) 📝 `src/cascadia/TerminalControl/EventArgs.h` (+5 -2) 📝 `src/cascadia/TerminalControl/EventArgs.idl` (+1 -0) </details> ### 📄 Description Turns out, this bug only repros in Controls version 2. I'm not sure why, but it didn't repro only on main. So this fix does nothing until #11720 merges. This PR prevents us from setting properties on the paste warning dialog unless we actually need to paste. 5f9c551b7edced4ed72a4b9694998143f96589a3 proves that settings these properties is what would cause the bug in the first place. I went a step further and cleaned this up a bit. This was always a little weird, having to get the `BracketedPasteEnabled` for the active control on the UI thread before we actually display the warning. In the post-#5000 future where going back to the control like this would be a x-proc hop, I figured I should just skip that entirely and plumb the `BracketedPaste` state out in the initial request. * [x] Closes #12202 * [x] I work here * [x] No tests, but there's not a great place for a test like this * [x] Doesn't affect docs See also: #12241 which would introduce #12202 on its own. --- <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:31:30 +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#28896