Skip to content

Commit

Permalink
fix: MaMo + ExpandSelectionToWord + shift left/right
Browse files Browse the repository at this point in the history
  • Loading branch information
carlos-zamora committed Aug 31, 2022
1 parent d8f3e56 commit 85b219a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/cascadia/TerminalCore/TerminalSelection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,14 @@ void Terminal::ExpandSelectionToWord()
{
const auto& buffer = _activeBuffer();
_selection->start = buffer.GetWordStart(_selection->start, _wordDelimiters);
_selection->pivot = _selection->start;
_selection->end = buffer.GetWordEnd(_selection->end, _wordDelimiters);

// if we're targetting both endpoints, instead just target "end"
if (WI_IsFlagSet(_selectionEndpoint, SelectionEndpoint::Start) && WI_IsFlagSet(_selectionEndpoint, SelectionEndpoint::End))
{
_selectionEndpoint = SelectionEndpoint::End;
}
}
}

Expand Down

0 comments on commit 85b219a

Please sign in to comment.