Skip to content

Commit

Permalink
FIX: Ctrl-D line deletion doesn't remove continuation prompt.
Browse files Browse the repository at this point in the history
  • Loading branch information
bfroehle committed Jan 26, 2012
1 parent d7c6b3e commit 8ae884d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions IPython/frontend/qt/console/console_widget.py
Expand Up @@ -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 ---------------------------------------------------

Expand Down

0 comments on commit 8ae884d

Please sign in to comment.