[education/rkward] rkward: Fix output position while trimming display

Thomas Friedrichsmeier null at kde.org
Sun Dec 25 10:42:41 GMT 2022


Git commit 7098c3b920ae009039d604175442aac4831913f1 by Thomas Friedrichsmeier.
Committed on 25/12/2022 at 10:42.
Pushed by tfry into branch 'master'.

Fix output position while trimming display

M  +1    -0    rkward/rkconsole.cpp

https://invent.kde.org/education/rkward/commit/7098c3b920ae009039d604175442aac4831913f1

diff --git a/rkward/rkconsole.cpp b/rkward/rkconsole.cpp
index 5f97c527..35624b2d 100644
--- a/rkward/rkconsole.cpp
+++ b/rkward/rkconsole.cpp
@@ -595,6 +595,7 @@ void RKConsole::newOutput (RCommand *command, const ROutput *output) {
 // KDE4: does the setUpdatesEnabled (false) still affect performance?
 			view->setUpdatesEnabled (false);		// major performance boost while removing lines!
 			doc->removeText (KTextEditor::Range (0, 0, c - RKSettingsModuleConsole::maxConsoleLines (), 0));
+			output_cursor.setLine(output_cursor.line() - c + RKSettingsModuleConsole::maxConsoleLines());
 			view->setUpdatesEnabled (true);
 		}
 	}


More information about the rkward-tracker mailing list