[education/rkward] rkward: Experimental fix for crash with KF 6.28.0
Thomas Friedrichsmeier
null at kde.org
Mon Aug 24 21:48:23 BST 2026
Git commit b53a1ac7964a847833de5cfd0719ca7fe8bf3c5b by Thomas Friedrichsmeier.
Committed on 24/08/2026 at 20:48.
Pushed by tfry into branch 'master'.
Experimental fix for crash with KF 6.28.0
Suspected cause is replacing an invalid range.
CCBUG: 524219
M +3 -1 rkward/rkconsole.cpp
https://invent.kde.org/education/rkward/-/commit/b53a1ac7964a847833de5cfd0719ca7fe8bf3c5b
diff --git a/rkward/rkconsole.cpp b/rkward/rkconsole.cpp
index cdd0ce15f..1aa0c1094 100644
--- a/rkward/rkconsole.cpp
+++ b/rkward/rkconsole.cpp
@@ -405,7 +405,9 @@ void RKConsole::setCurrentEditingLine(const QString &command) {
RK_TRACE(APP);
int lastline = doc->lines() - 1;
- doc->replaceText(KTextEditor::Range(lastline, prefix.length(), lastline, doc->lineLength(lastline)), command);
+ const auto line = u'\n' + doc->line(lastline).left(prefix.length()) + command;
+ doc->removeLine(lastline);
+ doc->insertText(doc->documentEnd(), line);
cursorAtTheEnd();
}
More information about the rkward-tracker
mailing list