Permalink
Browse files

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

See gh-1318.
  • Loading branch information...
1 parent d7c6b3e commit 8ae884dd272f41d9615e022c7366252c24184070 @bfroehle committed Jan 26, 2012
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 8ae884d

Please sign in to comment.