diff -r 9e2211f5f293 command-window.cpp --- a/command-window.cpp Tue May 28 23:06:08 2019 -0400 +++ b/command-window.cpp Thu May 30 00:35:45 2019 +0200 @@ -164,11 +164,11 @@ namespace calc this, SLOT (close (void))); insert_at_end - ("Qt Example Calculator.\n" - "Available operations: + - * / ^ ()\n" - "Semicolon terminates statement.\n" - "Up Arrow key moves to previous line in the command history.\n" - "Down Arrow key moves to next line in the comand history.\n\n"); + ("Qt Example Calculator.
\n" + "Available operations: + - * / ^ ()
\n" + "Semicolon terminates statement.
\n" + "Up Arrow key moves to previous line in the command history.
\n" + "Down Arrow key moves to next line in the comand history.

\n\n"); beg_mark = set_mark (); @@ -197,7 +197,7 @@ namespace calc void command_window::accept_line (const std::string& line) { - insert_at_end ("\n"); + insert_at_end ("
\n"); if (! line.empty ()) { @@ -226,7 +226,7 @@ namespace calc void command_window::handle_error (const QString& msg) { - insert_at_end ("parse error: " + msg.toStdString () + "\n"); + insert_at_end ("parse error: " + msg.toStdString () + "
\n"); rl_abort (0, 0); } @@ -397,7 +397,7 @@ namespace calc { QTextCursor cursor = textCursor (); - cursor.insertText (QString::fromStdString (text)); + cursor.insertHtml (QString::fromStdString (text)); setTextCursor (cursor); } @@ -423,7 +423,7 @@ namespace calc { std::ostringstream buf; - buf << "ans = " << value << "\n"; + buf << "ans = " << value << "
\n"; insert_at_cursor (buf.str ());