--- a/QScintilla/Shell.py Sat Nov 03 17:18:15 2018 +0100 +++ b/QScintilla/Shell.py Sat Nov 03 20:04:41 2018 +0100 @@ -827,6 +827,9 @@ """ Private method to write the prompt. """ + # get all queued text first by forcing the -_concatenateText() to run + self.__concatenateText("") + self.__write(self.inContinue and sys.ps2 or sys.ps1) # little trick to get the cursor position registered within QScintilla self.SendScintilla(QsciScintilla.SCI_CHARLEFT)