[rkward] rkward/windows: Fix obscure 'suscript out of bounds' error message for empty R Console previews
Thomas Friedrichsmeier
null at kde.org
Wed Mar 13 17:56:43 GMT 2019
Git commit 5e6aadf46ca93ab295394a2a98d819d0d8eef533 by Thomas Friedrichsmeier.
Committed on 13/03/2019 at 17:56.
Pushed by tfry into branch 'master'.
Fix obscure 'suscript out of bounds' error message for empty R Console previews
M +1 -1 rkward/windows/rkcommandeditorwindow.cpp
https://commits.kde.org/rkward/5e6aadf46ca93ab295394a2a98d819d0d8eef533
diff --git a/rkward/windows/rkcommandeditorwindow.cpp b/rkward/windows/rkcommandeditorwindow.cpp
index 74d63a49..67268c3e 100644
--- a/rkward/windows/rkcommandeditorwindow.cpp
+++ b/rkward/windows/rkcommandeditorwindow.cpp
@@ -875,7 +875,7 @@ void RKCommandEditorWindow::doRenderPreview () {
" exprs <- parse (%1, keep.source=TRUE)\n"
"})\n"
".rk.cat.output(rk.end.capture.output(TRUE))\n"
- "for (i in 1:length (exprs)) {\n"
+ "for (i in seq_len(length(exprs))) {\n"
" rk.print.code(as.character(attr(exprs, \"srcref\")[[i]]))\n"
" rk.capture.output(suppress.messages=TRUE)\n"
" try({\n"
More information about the rkward-tracker
mailing list