From 4f4df01391ef1433846b0867c74915a89cb3abe5 Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Wed, 28 Apr 2021 11:31:08 -0500 Subject: [PATCH] Fixes #9955.a ironic that all these bugs are all in the pixelPosition code that I yeeted in late on the last Wednesday I was working on the original PR --- src/cascadia/TerminalControl/ControlInteractivity.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cascadia/TerminalControl/ControlInteractivity.cpp b/src/cascadia/TerminalControl/ControlInteractivity.cpp index 552512815e8..7db1d486992 100644 --- a/src/cascadia/TerminalControl/ControlInteractivity.cpp +++ b/src/cascadia/TerminalControl/ControlInteractivity.cpp @@ -398,7 +398,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation } else { - _mouseScrollHandler(delta, terminalPosition, state.isLeftButtonDown); + _mouseScrollHandler(delta, pixelPosition, state.isLeftButtonDown); } return false; } @@ -430,10 +430,10 @@ namespace winrt::Microsoft::Terminal::Control::implementation // - Scroll the visible viewport in response to a mouse wheel event. // Arguments: // - mouseDelta: the mouse wheel delta that triggered this event. - // - point: the location of the mouse during this event + // - pixelPosition: the location of the mouse during this event // - isLeftButtonPressed: true iff the left mouse button was pressed during this event. void ControlInteractivity::_mouseScrollHandler(const double mouseDelta, - const til::point terminalPosition, + const til::point pixelPosition, const bool isLeftButtonPressed) { const auto currentOffset = _core->ScrollOffset(); @@ -458,7 +458,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation { // If user is mouse selecting and scrolls, they then point at new // character. Make sure selection reflects that immediately. - SetEndSelectionPoint(terminalPosition); + SetEndSelectionPoint(pixelPosition); } }