Merge pull request #5834 from SKefalidis/293129-selectall

fix #295156: select-all now highlights text without the need to release ctrl
This commit is contained in:
anatoly-os 2020-04-20 15:35:43 +03:00 committed by GitHub
commit b87666d764
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -377,7 +377,8 @@ bool TextBase::edit(EditData& ed)
case Qt::Key_A:
if (ctrlPressed) {
selectAll(_cursor);
_cursor->movePosition(QTextCursor::Start, QTextCursor::MoveMode::MoveAnchor);
_cursor->movePosition(QTextCursor::End, QTextCursor::MoveMode::KeepAnchor);
s.clear();
}
break;