Skip to content

Commit 9d33e89

Browse files
committed
Fixes #9955.C
1 parent 167ff7c commit 9d33e89

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/cascadia/TerminalControl/ControlInteractivity.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,12 @@ namespace winrt::Microsoft::Terminal::Control::implementation
265265
const auto fontSizeInDips{ _core->FontSizeInDips() };
266266
if (distance >= (std::min(fontSizeInDips.width(), fontSizeInDips.height()) / 4.f))
267267
{
268-
_core->SetSelectionAnchor(terminalPosition);
268+
// GH#9955.c: Make sure to use the temrinal location of the
269+
// _touchdown_ point here. We want to start the selection
270+
// from where the user initially clicked, not where they are
271+
// now.
272+
_core->SetSelectionAnchor(_getTerminalPosition(touchdownPoint));
273+
269274
// stop tracking the touchdown point
270275
_singleClickTouchdownPos = std::nullopt;
271276
}

0 commit comments

Comments
 (0)