File tree Expand file tree Collapse file tree
src/cascadia/TerminalControl Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -309,8 +309,10 @@ namespace winrt::Microsoft::Terminal::Control::implementation
309309 const auto isOnOriginalPosition = _lastMouseClickPosNoSelection == pixelPosition;
310310
311311 // Rounded coordinates for text selection.
312- // Don't round in VT mouse mode; cell-level precision matters more
313- const auto round = !_core->IsVtMouseModeEnabled ();
312+ // Don't round in VT mouse mode; cell-level precision matters more.
313+ // Only round for single-click: for double/triple-click, rounding
314+ // can push the position to the next cell, selecting the wrong word.
315+ const auto round = multiClickMapper == 1 && !_core->IsVtMouseModeEnabled ();
314316 _core->LeftClickOnTerminal (_getTerminalPosition (til::point{ pixelPosition }, round),
315317 multiClickMapper,
316318 altEnabled,
You can’t perform that action at this time.
0 commit comments