Skip to content

Commit 26c1f6f

Browse files
committed
Scroll to bottom after printing to the view.
1 parent fff5078 commit 26c1f6f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/SeerGdbMonitorWidget.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ void SeerGdbMonitorWidget::handleText (const QString& text) {
8181
if (id_text.toInt() == _monitorId) {
8282
QString output_text = Seer::parseFirst(text, "monitor-output=", '"', '"', false);
8383
textEdit->appendPlainText(Seer::unescape(output_text));
84+
textEdit->moveCursor(QTextCursor::End);
8485
}
8586
}
8687
}
@@ -92,6 +93,7 @@ void SeerGdbMonitorWidget::handleCommandLineEdit () {
9293
monitorCommandLineEdit->clear();
9394

9495
textEdit->appendPlainText("(monitor) " + command);
96+
textEdit->moveCursor(QTextCursor::End);
9597

9698
emit executeGdbMonitorCommand(_monitorId, command);
9799
}
@@ -175,7 +177,8 @@ void SeerGdbMonitorWidget::handleMacroToolButtonClicked (QAbstractButton* button
175177
continue;
176178
}
177179

178-
textEdit->appendPlainText("(gdbmonitor) " + command);
180+
textEdit->appendPlainText("(monitor) " + command);
181+
textEdit->moveCursor(QTextCursor::End);
179182

180183
emit executeGdbMonitorCommand(_monitorId, command);
181184
}

0 commit comments

Comments
 (0)