[PR #17138] Fix the location that selecting a mark uses #31130

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

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

State: closed
Merged: Yes


I think this subtly regressed in #16611. Jump to 90b8bb7c2d (diff-f9112caf8cb75e7a48a7b84987724d754181227385fbfcc2cc09a879b1f97c12L171-L223)

Terminal::SelectNewRegion is the only thing that uses the return value from Terminal::_ScrollToPoints. Before that PR, _ScrollToPoints was just a part of SelectNewRegion, and it moved the start & end coords by the _VisibleStartIndex, not the _scrollOffset.

Kinda weird there weren't any other tests for SelectNewRegion?

I also caught a second bug while I was here - If you had a line with an exact wrap, and tried to select that like with selectOutput, we'd explode.

Closes #17131

**Original Pull Request:** https://github.com/microsoft/terminal/pull/17138 **State:** closed **Merged:** Yes --- I think this subtly regressed in #16611. Jump to https://github.com/microsoft/terminal/commit/90b8bb7c2d8932fc601aed9c26f13c77d5a1321d#diff-f9112caf8cb75e7a48a7b84987724d754181227385fbfcc2cc09a879b1f97c12L171-L223 `Terminal::SelectNewRegion` is the only thing that uses the return value from `Terminal::_ScrollToPoints`. Before that PR, `_ScrollToPoints` was just a part of `SelectNewRegion`, and it moved the start & end coords by the `_VisibleStartIndex`, not the `_scrollOffset`. Kinda weird there weren't any _other_ tests for `SelectNewRegion`? I also caught a second bug while I was here - If you had a line with an exact wrap, and tried to select that like with selectOutput, we'd explode. Closes #17131
claunia added the pull-request label 2026-01-31 09:45:18 +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#31130