Skip to content

Commit

Permalink
Merge pull request radareorg#14 from sergiodmn/patch-1
Browse files Browse the repository at this point in the history
Auto scroll in console output for Linux
  • Loading branch information
hteso authored Mar 29, 2017
2 parents 583f52c + 23899aa commit 8b2876e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@ void MainWindow::on_consoleInputLineEdit_returnPressed()
if (this->core) {
QString input = ui->consoleInputLineEdit->text();
ui->consoleOutputTextEdit->appendPlainText(this->core->cmd(input));
ui->consoleOutputTextEdit->verticalScrollBar()->setValue(ui->consoleOutputTextEdit->verticalScrollBar()->maximum());
// Add new command to history
QCompleter *completer = ui->consoleInputLineEdit->completer();
/*
Expand Down Expand Up @@ -947,11 +948,13 @@ void MainWindow::get_refs(const QString& offset)
void MainWindow::add_output(QString msg)
{
ui->consoleOutputTextEdit->appendPlainText(msg);
ui->consoleOutputTextEdit->verticalScrollBar()->setValue(ui->consoleOutputTextEdit->verticalScrollBar()->maximum());
}

void MainWindow::add_debug_output(QString msg)
{
ui->consoleOutputTextEdit->appendHtml("<font color=\"red\"> [DEBUG]:\t" + msg + "</font>");
ui->consoleOutputTextEdit->verticalScrollBar()->setValue(ui->consoleOutputTextEdit->verticalScrollBar()->maximum());
}

void MainWindow::on_actionNew_triggered()
Expand Down

0 comments on commit 8b2876e

Please sign in to comment.