diff --git a/src/debug.h b/src/debug.h index 1c881dbe4..363b7d9c6 100644 --- a/src/debug.h +++ b/src/debug.h @@ -278,6 +278,9 @@ public: } std::string msg = oss.str(); + if (msg.at(msg.size() - sizeof TERM_RESET) == '\n') { // switch TERM_RESET and '\n' + msg.replace(msg.size() - sizeof TERM_RESET, sizeof TERM_RESET + 1, TERM_RESET "\n"); + } if (!get_log_output().is_interactive()) { msg = prune_ansi_sequences_str(msg.c_str());