Skip to content

Commit

Permalink
Add local echo of interpreter command (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
at-wat authored May 2, 2019
1 parent 5a9cfdc commit 8ee606b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ypspur_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,13 @@ void YPSpurGUI::on_interpreterCommand_returnPressed()
str.append("\n");
interpreter_.write(str.toLocal8Bit());
ui_->interpreterCommand->setText("");

QString data = str;
mutex_interpreter_output_.lock();
data.replace(QRegExp(" "), " ");
data.replace(QRegExp("\n"), "<br>");
printTextEdit(ui_->interpreterOut, data);
mutex_interpreter_output_.unlock();
}

bool YPSpurGUI::eventFilter(QObject* obj, QEvent* event)
Expand Down

0 comments on commit 8ee606b

Please sign in to comment.