Allow ending wordwise select in mousetracking mode

Commit e2167eb0 restricted deactivating the word-wise/line-wise
selection mode to mouse presses with no modifiers.  Since in
mouse-tracking mode, the Shift key has to be pressed to not pass mouse
events to the application running on the terminal, there was no way to
end word-wise/line-wise selection mode without sending a mouse event to
the application.

Modify the logic so ending word-wise/line-wise selection mode is done by
a LMB button press with no modifiers on non-mousetracking mode, and by a
LMB button press with only the Shift modifier on mousetracking mode.

BUG: 408048
wilder
Luis Javier Merino Morán 4 years ago committed by Tomaz Canabrava
parent d34fe1a289
commit e4cbfef2b5
  1. 2
      src/terminalDisplay/TerminalDisplay.cpp

@ -1201,7 +1201,7 @@ void TerminalDisplay::mousePressEvent(QMouseEvent *ev)
}
}
if (!ev->modifiers()) {
if ((!usesMouseTracking() && !ev->modifiers()) || (usesMouseTracking() && ev->modifiers() == Qt::ShiftModifier)) {
_lineSelectionMode = false;
_wordSelectionMode = false;
}

Loading…
Cancel
Save