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

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

Original Pull Request: https://github.com/microsoft/terminal/pull/12208

State: closed
Merged: Yes


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.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/12208 **State:** closed **Merged:** Yes --- 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.
claunia added the pull-request label 2026-01-31 09:31: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#28901