From 6aaf841a73fe72c42d0fd6dc2db40690d969b96b Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 16 Dec 2023 22:00:41 +0000 Subject: [PATCH] Ignore Cmd+Up/Down if field isn't empty. --- Telegram/SourceFiles/history/history_widget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 4cf3f03c8..914af7961 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -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