src/messagelog.cpp

changeset 514
d78fea0f664c
parent 513
29eb671b34f6
child 527
47c068f2e7e3
--- a/src/messagelog.cpp	Fri Oct 18 21:52:09 2013 +0300
+++ b/src/messagelog.cpp	Fri Oct 18 22:07:26 2013 +0300
@@ -119,9 +119,11 @@
 void DoLog (std::initializer_list<StringFormatArg> args)
 {	const str msg = DoFormat (args);
 
-	if (g_win)
-		g_win->addMessage (msg);
+	for (str& a : msg.split ("\n", QString::SkipEmptyParts))
+	{	if (g_win)
+			g_win->addMessage (a);
 
-	// Also print it to stdout
-	fprint (stdout, "%1", msg);
+		// Also print it to stdout
+		fprint (stdout, "%1\n", a);
+	}
 }

mercurial