From cc9527d6c4fb4f85dd7d4ec719839d61acaab0b0 Mon Sep 17 00:00:00 2001 From: bruneton Date: Thu, 4 Apr 2013 14:46:29 +0000 Subject: [PATCH] Minor: cursor position wasn't handled properly. --- src/PyConsole/PyConsole_Editor.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PyConsole/PyConsole_Editor.cxx b/src/PyConsole/PyConsole_Editor.cxx index cee79f245..2d7317ba4 100644 --- a/src/PyConsole/PyConsole_Editor.cxx +++ b/src/PyConsole/PyConsole_Editor.cxx @@ -398,7 +398,9 @@ void PyConsole_Editor::execAndWait( const QString& command ) void PyConsole_Editor::handleReturn() { // Position cursor at the end - textCursor().movePosition(QTextCursor::End); + QTextCursor curs(textCursor()); + curs.movePosition(QTextCursor::End); + setTextCursor(curs); // get last line QTextBlock par = document()->end().previous(); -- 2.39.2