Merge pull request #151 from Tucos/ws-hist
authorManuel Nickschas <sputnick@quassel-irc.org>
Thu, 8 Oct 2015 22:12:37 +0000 (00:12 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 8 Oct 2015 22:12:37 +0000 (00:12 +0200)
Preserve white-space in the input history.

src/uisupport/multilineedit.cpp

index 7e89f49..37f1f62 100644 (file)
@@ -55,6 +55,9 @@ MultiLineEdit::MultiLineEdit(QWidget *parent)
     setLineWrapEnabled(false);
     reset();
 
+    // Prevent QTextHtmlImporter::appendNodeText from eating whitespace
+    document()->setDefaultStyleSheet("span { white-space: pre-wrap; }");
+
     connect(this, SIGNAL(textChanged()), this, SLOT(on_textChanged()));
 
     _mircColorMap["00"] = "#ffffff";