Preserve double/triple click mode when extending the selection

Summary:
When extending the selection using the mouse the double or triple click
mode that initiated the selection should be preserved.  If the user double
clicked to select a word, then extending the selection should extend
"word at a time" rather than "character at a time". Similarly if the user
triple clicked to select a whole line initially, then extending the selection
should extend "line at a time" rather than "character at a time".

BUG: 374454
FIXED-IN: 18.12

Reviewers: #konsole, hindenburg

Reviewed By: #konsole, hindenburg

Subscribers: konsole-devel

Tags: #konsole

Differential Revision: https://phabricator.kde.org/D16660
wilder-portage
Glenn Coombs 7 years ago committed by Kurt Hindenburg
parent 7dbcfdf1be
commit e2167eb067
  1. 6
      src/TerminalDisplay.cpp

@ -2309,8 +2309,10 @@ void TerminalDisplay::mousePressEvent(QMouseEvent* ev)
}
}
_lineSelectionMode = false;
_wordSelectionMode = false;
if (!ev->modifiers()) {
_lineSelectionMode = false;
_wordSelectionMode = false;
}
// The user clicked inside selected text
bool selected = _screenWindow->isSelected(pos.x(), pos.y());

Loading…
Cancel
Save