We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 975cb34 commit 2b63751Copy full SHA for 2b63751
qtmips_gui/terminaldock.cpp
@@ -75,10 +75,16 @@ void TerminalDock::setup(machine::SerialPort *ser_port) {
75
}
76
77
void TerminalDock::tx_byte(unsigned int data) {
78
+ bool at_end = terminal_text->textCursor().atEnd();
79
if (data == '\n')
80
append_cursor->insertBlock();
81
else
82
append_cursor->insertText(QString(QChar(data)));
83
+ if (at_end) {
84
+ QTextCursor cursor = QTextCursor(terminal_text->document());
85
+ cursor.movePosition(QTextCursor::End);
86
+ terminal_text->setTextCursor(cursor);
87
+ }
88
89
90
void TerminalDock::tx_byte(int fd, unsigned int data)
0 commit comments