Commits

Henning Schröder committed 2ce32e8

immediately flush output after printing prompt

  • Participants
  • Parent commits 1c974a2

Comments (0)

Files changed (1)

codeaide/modes/base/console.py

                 self.history_index += 1
             remove_line()
             self.write("\n%s%s" % (ps1orps2, self.history[self.history_index]))
+            self.flush()
         elif key == Qt.Key_Down:
             if self.history_index > 0:
                 self.history_index -= 1
             remove_line()
             self.write("\n%s%s" % (ps1orps2, self.history[self.history_index]))
+            self.flush()
         elif key == Qt.Key_Tab:
             if modifiers & Qt.ControlModifier:
                 self.write(" " * 4)
                 remove_line()
                 self.write("\n%s%s" % (
                     ps1orps2, self.completer.complete(line, self.tab_state) or line))
+            self.flush()
         elif key == Qt.Key_Backtab:
             if self.completer:
                 if self.tab_state >= 0:
                 remove_line()
                 self.write("%s%s" % (
                     ps1orps2, self.completer.complete(line, self.tab_state) or line))
+                self.flush()
         elif key in [Qt.Key_Backspace, Qt.Key_Left]:
             if self.textedit.textCursor().columnNumber() > len(ps1orps2) + 1:
                 return False
                 self.write("%s" % self.ps2)
             else:
                 self.write("%s" % self.ps1)
+            self.flush()
             if line and line != self.history[self.history_index]:
                 self.history.insert(1, line)
             self.history_index = 0