fixes #0002923: Python console history misbehaves with word-wrapped lines

This commit is contained in:
wmayer
2017-12-02 15:39:39 +01:00
parent 25afe3227c
commit 34b40f23a1

View File

@@ -1046,7 +1046,7 @@ QTextCursor PythonConsole::inputBegin( void ) const
// construct cursor at begin of input line ...
QTextCursor inputLineBegin( this->textCursor() );
inputLineBegin.movePosition( QTextCursor::End );
inputLineBegin.movePosition( QTextCursor::StartOfLine );
inputLineBegin.movePosition( QTextCursor::StartOfBlock );
// ... and move cursor right beyond the prompt.
inputLineBegin.movePosition( QTextCursor::Right, QTextCursor::MoveAnchor, promptLength( inputLineBegin.block().text() ) );
return inputLineBegin;