Skip to content

Commit

Permalink
Merge pull request #893 from bx/ctrl
Browse files Browse the repository at this point in the history
add ctrl-g keybinding to cancel prompt
  • Loading branch information
pazz committed Oct 15, 2016
2 parents 747b894 + 25ab841 commit ebf9485
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions alot/widgets/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class CompleteEdit(urwid.Edit):
The interpretation of some keypresses is hard-wired:
:enter: calls 'on_exit' callback with current value
:esc: calls 'on_exit' with value `None`, which can be interpreted
:esc/ctrl g: calls 'on_exit' with value `None`, which can be interpreted
as cancelation
:tab: calls the completer and tabs forward in the result list
:shift tab: tabs backward in the result list
Expand Down Expand Up @@ -168,7 +168,7 @@ def keypress(self, size, key):
self.set_edit_text(self.history[self.historypos])
elif key == 'enter':
self.on_exit(self.edit_text)
elif key == 'esc':
elif key in ('ctrl g', 'esc'):
self.on_exit(None)
elif key == 'ctrl a':
self.set_edit_pos(0)
Expand Down

0 comments on commit ebf9485

Please sign in to comment.