##// END OF EJS Templates
Merge pull request #2101 from Carreau/fixes-2082...
Fernando Perez -
r7821:811283a3 merge
parent child Browse files
Show More
@@ -884,15 +884,16 b' class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):'
884 884 the prompt region.
885 885 """
886 886 # Select and remove all text below the input buffer.
887 _temp_buffer_filled = False
888 887 cursor = self._get_prompt_cursor()
889 888 prompt = self._continuation_prompt.lstrip()
890 while cursor.movePosition(QtGui.QTextCursor.NextBlock):
891 temp_cursor = QtGui.QTextCursor(cursor)
892 temp_cursor.select(QtGui.QTextCursor.BlockUnderCursor)
893 text = temp_cursor.selection().toPlainText().lstrip()
894 if not text.startswith(prompt):
895 break
889 if(self._temp_buffer_filled):
890 self._temp_buffer_filled = False
891 while cursor.movePosition(QtGui.QTextCursor.NextBlock):
892 temp_cursor = QtGui.QTextCursor(cursor)
893 temp_cursor.select(QtGui.QTextCursor.BlockUnderCursor)
894 text = temp_cursor.selection().toPlainText().lstrip()
895 if not text.startswith(prompt):
896 break
896 897 else:
897 898 # We've reached the end of the input buffer and no text follows.
898 899 return
@@ -945,7 +946,7 b' class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):'
945 946 self._control.moveCursor(QtGui.QTextCursor.End)
946 947 self._control.setTextCursor(cursor)
947 948
948 _temp_buffer_filled = True
949 self._temp_buffer_filled = True
949 950
950 951
951 952 def _context_menu_make(self, pos):
General Comments 0
You need to be logged in to leave comments. Login now