Skip to content

Commit

Permalink
[Q_shell] Make sure output of print() in the scripting shell is newli…
Browse files Browse the repository at this point in the history
…ne-terminated
  • Loading branch information
eumagga0x2a committed Aug 20, 2023
1 parent 4e3b670 commit aff4b9d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion avidemux/qt4/ADM_userInterfaces/ADM_shell/Q_shell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,10 @@ bool qShell::print(IScriptEngine::EventType type,const char *s)
case IScriptEngine::Error: ui.textBrowser->setTextColor(Qt::red); break;
default: break;
}
ui.textBrowser->insertPlainText(QString::fromUtf8(s));
QString text = QString::fromUtf8(s);
if(!text.isEmpty() && !text.endsWith("\n"))
text += "\n";
ui.textBrowser->insertPlainText(text);
ui.textBrowser->setTextColor(old);
return true;
}
Expand Down

0 comments on commit aff4b9d

Please sign in to comment.