[rkward/work/render_rmd] rkward/rbackend: Fix ordering of command and output in console capturing/preview
Thomas Friedrichsmeier
null at kde.org
Fri Sep 28 17:40:39 BST 2018
Git commit 7d4cc69492eb8d6ab7e046478645697ffb31df45 by Thomas Friedrichsmeier.
Committed on 28/09/2018 at 16:39.
Pushed by tfry into branch 'work/render_rmd'.
Fix ordering of command and output in console capturing/preview
M +5 -5 rkward/rbackend/rkrbackend.cpp
https://commits.kde.org/rkward/7d4cc69492eb8d6ab7e046478645697ffb31df45
diff --git a/rkward/rbackend/rkrbackend.cpp b/rkward/rbackend/rkrbackend.cpp
index 2e479bec..51aad495 100644
--- a/rkward/rbackend/rkrbackend.cpp
+++ b/rkward/rbackend/rkrbackend.cpp
@@ -784,15 +784,15 @@ void RBusy (int busy) {
// R_ReplIteration calls R_Busy (1) after reading in code (if needed), successfully parsing it, and right before evaluating it.
if (busy) {
if (RKRBackend::repl_status.user_command_status == RKRBackend::RKReplStatus::UserCommandTransmitted) {
- if (RKRBackend::this_pointer->current_command->type & RCommand::CCCommand) {
- QByteArray chunk = RKRBackend::repl_status.user_command_buffer.mid (RKRBackend::repl_status.user_command_parsed_up_to, RKRBackend::repl_status.user_command_transmitted_up_to - RKRBackend::repl_status.user_command_parsed_up_to);
- RKRBackend::this_pointer->printCommand (RKRBackend::toUtf8 (chunk));
- }
if (RKRBackend::this_pointer->current_command->type & RCommand::CCOutput) {
- // flush any previous output caputre and start a new one
+ // flush any previous output capture and start a new one
if (RKRBackend::repl_status.user_command_successful_up_to > 0) RKRBackend::this_pointer->printAndClearCapturedMessages (false);
RKRBackend::this_pointer->startOutputCapture ();
}
+ if (RKRBackend::this_pointer->current_command->type & RCommand::CCCommand) {
+ QByteArray chunk = RKRBackend::repl_status.user_command_buffer.mid (RKRBackend::repl_status.user_command_parsed_up_to, RKRBackend::repl_status.user_command_transmitted_up_to - RKRBackend::repl_status.user_command_parsed_up_to);
+ RKRBackend::this_pointer->printCommand (RKRBackend::toUtf8 (chunk));
+ }
RKRBackend::repl_status.user_command_parsed_up_to = RKRBackend::repl_status.user_command_transmitted_up_to;
RKRBackend::repl_status.user_command_status = RKRBackend::RKReplStatus::UserCommandRunning;
}
More information about the rkward-tracker
mailing list