From caa11dda3edd717a54f037fda6f2a7dbc9e25dfa Mon Sep 17 00:00:00 2001 From: Matthew Marlow <44077383+mfmarlow@users.noreply.github.com> Date: Sun, 19 Jul 2020 03:16:58 -0700 Subject: [PATCH] removed linebreak after wrapped TextElements (#1813) --- src/messages/MessageElement.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/messages/MessageElement.cpp b/src/messages/MessageElement.cpp index 85e85b306..42c0204af 100644 --- a/src/messages/MessageElement.cpp +++ b/src/messages/MessageElement.cpp @@ -361,10 +361,9 @@ void TextElement::addToContainer(MessageLayoutContainer &container, if (isSurrogate) i++; } - - container.addElement(getTextLayoutElement( + //add the final piece of wrapped text + container.addElementNoLineBreak(getTextLayoutElement( text.mid(wordStart), width, this->hasTrailingSpace())); - container.breakLine(); } } } @@ -670,10 +669,9 @@ void IrcTextElement::addToContainer(MessageLayoutContainer &container, } // Add last remaining text & segments - container.addElement( + container.addElementNoLineBreak( getTextLayoutElement(text.mid(wordStart), segments, width, this->hasTrailingSpace())); - container.breakLine(); } } }