Ignore Cmd+Up/Down if field isn't empty.

This commit is contained in:
John Preston 2023-12-16 22:00:41 +00:00
parent 60e72768e1
commit 6aaf841a73

View file

@ -4561,7 +4561,7 @@ bool HistoryWidget::eventFilter(QObject *obj, QEvent *e) {
if (k->key() == Qt::Key_Up) {
#ifdef Q_OS_MAC
// Cmd + Up is used instead of Home.
if (!_field->textCursor().atStart()) {
if (HasSendText(_field)) {
return false;
}
#endif
@ -4569,7 +4569,7 @@ bool HistoryWidget::eventFilter(QObject *obj, QEvent *e) {
} else if (k->key() == Qt::Key_Down) {
#ifdef Q_OS_MAC
// Cmd + Down is used instead of End.
if (!_field->textCursor().atEnd()) {
if (HasSendText(_field)) {
return false;
}
#endif