Show More
@@ -267,7 +267,6 b' class ConsoleWidget(QtGui.QPlainTextEdit):' | |||
|
267 | 267 | self._reading = False |
|
268 | 268 | if self._reading_callback: |
|
269 | 269 | self._reading_callback() |
|
270 | self._reading_callback = None | |
|
271 | 270 | elif not self._executing: |
|
272 | 271 | self.execute(interactive=True) |
|
273 | 272 | intercepted = True |
@@ -366,16 +365,19 b' class ConsoleWidget(QtGui.QPlainTextEdit):' | |||
|
366 | 365 | cursor.insertText(text) |
|
367 | 366 | |
|
368 | 367 | def clear(self, keep_input=False): |
|
369 |
""" Reimplemented to write a new prompt. If |
|
|
370 |
restores the old input buffer when the new |
|
|
368 | """ Reimplemented to cancel reading and write a new prompt. If | |
|
369 | 'keep_input' is set, restores the old input buffer when the new | |
|
370 | prompt is written. | |
|
371 | 371 | """ |
|
372 | 372 | super(ConsoleWidget, self).clear() |
|
373 | ||
|
374 | if keep_input: | |
|
373 | ||
|
374 | input_buffer = '' | |
|
375 | if self._reading: | |
|
376 | self._reading = False | |
|
377 | elif keep_input: | |
|
375 | 378 | input_buffer = self.input_buffer |
|
376 | 379 | self._show_prompt() |
|
377 | if keep_input: | |
|
378 | self.input_buffer = input_buffer | |
|
380 | self.input_buffer = input_buffer | |
|
379 | 381 | |
|
380 | 382 | def paste(self): |
|
381 | 383 | """ Reimplemented to ensure that text is pasted in the editing region. |
General Comments 0
You need to be logged in to leave comments.
Login now