Skip to content

Commit 4995af3

Browse files
MengAiDevDHowett
authored andcommitted
Prevent cursor repositioning during mouse selection (#19182)
- Modify the cursor repositioning logic to check if a selection is in progress - Only reposition the cursor when the mouse is used for positioning, not during selection operations Closes #19181 (cherry picked from commit 88ab154) Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgdSbu4 Service-Version: 1.23
1 parent ed022e8 commit 4995af3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cascadia/TerminalControl/ControlCore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2064,7 +2064,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
20642064
_terminal->MultiClickSelection(terminalPosition, mode);
20652065
selectionNeedsToBeCopied = true;
20662066
}
2067-
else if (_settings->RepositionCursorWithMouse()) // This is also mode==Char && !shiftEnabled
2067+
else if (_settings->RepositionCursorWithMouse() && !selectionNeedsToBeCopied) // Don't reposition cursor if this is part of a selection operation
20682068
{
20692069
_repositionCursorWithMouse(terminalPosition);
20702070
}

0 commit comments

Comments
 (0)