Permalink
Browse files

FIX: Ctrl-D line deletion doesn't remove continuation prompt.

See gh-1318.
  • Loading branch information...
bfroehle authored and ivanov committed Jan 26, 2012
1 parent 0c2e430 commit fa14b26983e17a6533319b3ef2aff301a99aed4a
Showing with 7 additions and 0 deletions.
  1. +7 −0 IPython/frontend/qt/console/console_widget.py
@@ -1114,9 +1114,16 @@ def _event_filter_console_keypress(self, event):
cursor.setPosition(position, QtGui.QTextCursor.KeepAnchor)
self._kill_ring.kill_cursor(cursor)
intercepted = True
+
elif key == QtCore.Qt.Key_D:
if len(self.input_buffer) == 0:
self.exit_requested.emit(self)
+ else:
+ new_event = QtGui.QKeyEvent(QtCore.QEvent.KeyPress,
+ QtCore.Qt.Key_Delete,
+ QtCore.Qt.NoModifier)
+ QtGui.qApp.sendEvent(self._control, new_event)
+ intercepted = True
#------ Alt modifier ---------------------------------------------------

0 comments on commit fa14b26

Please sign in to comment.