diff --git a/src/libneochat/chatmarkdownhelper.cpp b/src/libneochat/chatmarkdownhelper.cpp index 7560f551c..44b2f580e 100644 --- a/src/libneochat/chatmarkdownhelper.cpp +++ b/src/libneochat/chatmarkdownhelper.cpp @@ -5,6 +5,7 @@ #include #include +#include #include #include "chattextitemhelper.h" @@ -188,7 +189,7 @@ void ChatMarkdownHelper::checkMarkdown(int position, int charsRemoved, int chars // This can happen when formatting is applied. if (charsAdded == charsRemoved) { return; - } else if (m_textItem->isCompleting || charsRemoved > charsAdded || charsAdded - charsRemoved > 1) { + } else if ((m_textItem->textFormat() && m_textItem->textFormat() == Qt::TextFormat::PlainText) || m_textItem->isCompleting || charsRemoved > charsAdded || charsAdded - charsRemoved > 1) { updatePosition(std::max(0, position - charsRemoved + charsAdded)); return; }