Compare commits

...

1 Commits

Author SHA1 Message Date
Carlos Zamora
e9a1fe57be Fix rounding error for word selection 2026-04-06 17:11:46 -07:00

View File

@@ -309,8 +309,10 @@ namespace winrt::Microsoft::Terminal::Control::implementation
const auto isOnOriginalPosition = _lastMouseClickPosNoSelection == pixelPosition;
// Rounded coordinates for text selection.
// Don't round in VT mouse mode; cell-level precision matters more
const auto round = !_core->IsVtMouseModeEnabled();
// Don't round in VT mouse mode; cell-level precision matters more.
// Only round for single-click: for double/triple-click, rounding
// can push the position to the next cell, selecting the wrong word.
const auto round = multiClickMapper == 1 && !_core->IsVtMouseModeEnabled();
_core->LeftClickOnTerminal(_getTerminalPosition(til::point{ pixelPosition }, round),
multiClickMapper,
altEnabled,