From b45ded678e8b262ca40545e7b7ee3e60160a1587 Mon Sep 17 00:00:00 2001 From: James Graham Date: Sat, 10 Jan 2026 17:39:38 +0000 Subject: [PATCH] Fix multi line quotes --- src/libneochat/chatkeyhelper.cpp | 1 - src/messagecontent/QuoteComponent.qml | 1 - src/messagecontent/TextComponent.qml | 1 - src/messagecontent/models/chatbarmessagecontentmodel.cpp | 3 ++- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/libneochat/chatkeyhelper.cpp b/src/libneochat/chatkeyhelper.cpp index c207251a0..a5fbcca27 100644 --- a/src/libneochat/chatkeyhelper.cpp +++ b/src/libneochat/chatkeyhelper.cpp @@ -3,7 +3,6 @@ #include "chatkeyhelper.h" -#include "chatbarcache.h" #include "chattextitemhelper.h" #include "clipboard.h" #include "neochatroom.h" diff --git a/src/messagecontent/QuoteComponent.qml b/src/messagecontent/QuoteComponent.qml index 05727553e..cb503fbbf 100644 --- a/src/messagecontent/QuoteComponent.qml +++ b/src/messagecontent/QuoteComponent.qml @@ -75,7 +75,6 @@ QQC2.TextArea { text: root.editable ? "" : root.display selectByMouse: true - persistentSelection: true readOnly: !root.editable textFormat: TextEdit.RichText wrapMode: TextEdit.Wrap diff --git a/src/messagecontent/TextComponent.qml b/src/messagecontent/TextComponent.qml index 0d3b83a02..e42ddf9b5 100644 --- a/src/messagecontent/TextComponent.qml +++ b/src/messagecontent/TextComponent.qml @@ -87,7 +87,6 @@ TextEdit { leftPadding: Kirigami.Units.smallSpacing rightPadding: Kirigami.Units.smallSpacing - persistentSelection: true text: root.editable ? "" : display diff --git a/src/messagecontent/models/chatbarmessagecontentmodel.cpp b/src/messagecontent/models/chatbarmessagecontentmodel.cpp index 10e341689..b15923b45 100644 --- a/src/messagecontent/models/chatbarmessagecontentmodel.cpp +++ b/src/messagecontent/models/chatbarmessagecontentmodel.cpp @@ -543,7 +543,7 @@ inline QString formatQuote(const QString &input) string.removeLast(); } if (!stringOut.isEmpty()) { - stringOut += u"\n\n"_s; + stringOut += u"\n"_s; } stringOut += u"> "_s + string; } @@ -562,6 +562,7 @@ QString ChatBarMessageContentModel::messageText() const if (MessageComponentType::isTextType(component.type)) { if (const auto textItem = textItemForComponent(component)) { auto newText = textItem->markdownText(); + newText.replace(QRegularExpression(u"(?