[PR #10650] Fix a pair of TermControl dragging bugs #28162

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

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

State: closed
Merged: Yes


Summary of the Pull Request

This fixes two bugs related to dragging into the bounds of the TermControl. Although the fixes are fairly small, I'm batching them up, because I don't want to stack 2 more PRs on top of #10051.

  • #9109
    • This is fixed by only starting an autoscroll if the click&drag actually started within the bounds of the control.
  • #4603
    • Building on the above change, only modify the selection when the drag started in the control.

References

PR Checklist

Detailed Description of the Pull Request / Additional comments

This is kind of annoying that the auto-scrolling is handled by the TermControl, but it uses a timer that's still a WinUI construct.

We only want to start the auto-scrolling behavior when the drag started inside the control. Otherwise, in the tab drag scenario, dragging into the bounds of the TermControl will trick it into thinking it should start a scroll.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/10650 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request This fixes two bugs related to dragging into the bounds of the `TermControl`. Although the fixes are fairly small, I'm batching them up, because I don't want to stack 2 more PRs on top of #10051. * #9109 - This is fixed by only starting an autoscroll if the click&drag actually started within the bounds of the control. * #4603 - Building on the above change, only modify the selection when the drag started in the control. ## References * srsly go read #10051. ## PR Checklist * [x] Closes #9109 * [x] Closes #4603 * [x] I work here * [x] Test added * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments This is kind of annoying that the auto-scrolling is handled by the TermControl, but it uses a timer that's still a WinUI construct. We only want to start the auto-scrolling behavior when the drag started _inside_ the control. Otherwise, in the tab drag scenario, dragging into the bounds of the TermControl will trick it into thinking it should start a scroll.
claunia added the pull-request label 2026-01-31 09:26:43 +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#28162