Skip to content

Commit

Permalink
append rizin results in plaintext to include tabs etc (fixes #3193) (#…
Browse files Browse the repository at this point in the history
…3236)

the output of rizin was formatted as html, which caused \n to become
<br/>, making it impossible to just use appendPlainText() as-is. We have
to tell rizin not to give us html, so that we can use \t in the output.

Simply replacing \t with spaces, `&emsp;` or similar doesn't work, as
the appendHtml() replaces multiple spaces with one.
  • Loading branch information
lionkor committed Aug 30, 2023
1 parent 238dd62 commit 8f707e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/widgets/ConsoleWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,10 @@ void ConsoleWidget::executeCommand(const QString &command)

RVA oldOffset = Core()->getOffset();
commandTask = QSharedPointer<CommandTask>(
new CommandTask(command, CommandTask::ColorMode::MODE_256, true));
new CommandTask(command, CommandTask::ColorMode::MODE_256, false));
connect(commandTask.data(), &CommandTask::finished, this,
[this, cmd_line, command, oldOffset](const QString &result) {
ui->outputTextEdit->appendHtml(result);
ui->outputTextEdit->appendPlainText(result);
scrollOutputToEnd();
historyAdd(command);
commandTask.clear();
Expand Down

0 comments on commit 8f707e4

Please sign in to comment.