aboutsummaryrefslogtreecommitdiff
path: root/aotextarea.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'aotextarea.cpp')
-rw-r--r--aotextarea.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/aotextarea.cpp b/aotextarea.cpp
index 18551c1..a61a248 100644
--- a/aotextarea.cpp
+++ b/aotextarea.cpp
@@ -17,24 +17,20 @@ void AOTextArea::append_chatmessage(QString p_name, QString p_message)
this->moveCursor(QTextCursor::End);
- this->insertPlainText(p_name + ": ");
+ this->append(p_name + ": ");
- QRegExp split_rx("(\\ |\\n)");
- QStringList word_list = p_message.split(split_rx);
+ QStringList word_list = p_message.split(" ");
for (QString i_word : word_list)
{
if (i_word.startsWith("http"))
{
- i_word.replace("\r", "");
this->insertHtml("<a href=\"" + i_word + "\">" + i_word + "</a> ");
}
else
this->insertPlainText(i_word + " ");
}
- this->insertPlainText("\n");
-
if (old_cursor.hasSelection() || !is_scrolled_down)
{
// The user has selected text or scrolled away from the bottom: maintain position.