Bugfix: don't round to nearest cell for mouse movements and VT mouse mode (#18602)

Missed a few `_getTerminalPosition()` on the first run. Disabled
rounding for pointer movements and mouse wheel events (which are used
for hyperlink hover detection and vt mouse mode). The only time we round
now is...
- `SetEndSelectionPoint()` --> because we're updating a selection
- `ControlCore->LeftClickOnTerminal()` --> where all paths are used for
selection*

*the only path that doesn't is `RepositionCursorWithMouse` being
enabled, which also makes sense based on clicking around Notepad with a
large font size.

## References and Relevant Issues
Follow-up for #18486
Closes #18595

## Validation Steps Performed
In large font size, play around with midnight commander and hover over
hyperlink edges.

(cherry picked from commit e5b972a828cf8749a55a9822b95eea39e4fdd389)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgXgv1c
Service-Version: 1.23
This commit is contained in:
Carlos Zamora 2025-02-26 10:51:10 -08:00 committed by Dustin L. Howett
parent 70996f35d0
commit 2060fd6b11

View File

@ -340,7 +340,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
const Core::Point pixelPosition,
const bool pointerPressedInBounds)
{
const auto terminalPosition = _getTerminalPosition(til::point{ pixelPosition }, true);
const auto terminalPosition = _getTerminalPosition(til::point{ pixelPosition }, false);
// Returning true from this function indicates that the caller should do no further processing of this movement.
bool handledCompletely = false;
@ -489,7 +489,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
const Core::Point pixelPosition,
const Control::MouseButtonState buttonState)
{
const auto terminalPosition = _getTerminalPosition(til::point{ pixelPosition }, true);
const auto terminalPosition = _getTerminalPosition(til::point{ pixelPosition }, false);
// Short-circuit isReadOnly check to avoid warning dialog.
//