Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix marking of new selection start #9727

Merged
1 commit merged into from
Apr 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/cascadia/TerminalControl/TermControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1353,11 +1353,14 @@ namespace winrt::Microsoft::Terminal::Control::implementation
mode = ::Terminal::SelectionExpansionMode::Line;
}

// Capture the position of the first click when no selection is active
if (mode == ::Terminal::SelectionExpansionMode::Cell && !_terminal->IsSelectionActive())
// Capture the position of the first click
if (mode == ::Terminal::SelectionExpansionMode::Cell)
{
_singleClickTouchdownPos = cursorPosition;
_lastMouseClickPosNoSelection = cursorPosition;
if (!_terminal->IsSelectionActive())
{
_lastMouseClickPosNoSelection = cursorPosition;
}
}

// We reset the active selection if one of the conditions apply:
Expand Down