diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 955d41eba6..58532afe6a 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -7755,7 +7755,7 @@ bool HistoryWidget::replyToPreviousMessage() { controller()->showMessage(previous); if (isFieldVisible) { if (previous->isLocal()) { - cancelReply(); + cancelReply(false, true); } else { replyToMessage(previous); } @@ -7798,13 +7798,12 @@ bool HistoryWidget::replyToNextMessage() { controller()->showMessage(next); if (isFieldVisible) { if (next->isLocal()) { - cancelReply(); + cancelReply(false, true); } else { replyToMessage(next); } } } else { - _highlighter.clear(); cancelReply(false); } return true; @@ -8971,7 +8970,9 @@ bool HistoryWidget::cancelReplyOrSuggest(bool lastKeyboardUsed) { return ok1 || ok2; } -bool HistoryWidget::cancelReply(bool lastKeyboardUsed) { +bool HistoryWidget::cancelReply( + bool lastKeyboardUsed, + bool keepHighlighterState) { bool wasReply = false; if (_replyTo) { wasReply = true; @@ -8986,6 +8987,9 @@ bool HistoryWidget::cancelReply(bool lastKeyboardUsed) { _fieldBarCancel->hide(); updateMouseTracking(); } + if (!keepHighlighterState) { + _highlighter.clear(); + } updateBotKeyboard(); refreshTopBarActiveChat(); updateCanSendMessage(); diff --git a/Telegram/SourceFiles/history/history_widget.h b/Telegram/SourceFiles/history/history_widget.h index 7d2e521564..5b4f65b0c1 100644 --- a/Telegram/SourceFiles/history/history_widget.h +++ b/Telegram/SourceFiles/history/history_widget.h @@ -222,7 +222,9 @@ public: bool lastForceReplyReplied(const FullMsgId &replyTo) const; bool lastForceReplyReplied() const; bool cancelReplyOrSuggest(bool lastKeyboardUsed = false); - bool cancelReply(bool lastKeyboardUsed = false); + bool cancelReply( + bool lastKeyboardUsed = false, + bool keepHighlighterState = false); bool cancelSuggestPost(); void cancelEdit(); void updateForwarding();