summaryrefslogtreecommitdiff
path: root/alot/widgets/globals.py
diff options
context:
space:
mode:
authorbx <bx@localhost>2016-09-02 07:57:45 -0400
committerbx <bx@localhost>2016-09-02 07:57:45 -0400
commit25ab84106bd38f586f9c4901160aa6f7162f3cd0 (patch)
tree1405aa1eda17c2b9e43fb3a96552a55744283b97 /alot/widgets/globals.py
parent1351d173c25c2c4b78bd197dd3ff0a903b96f3f0 (diff)
added ctrl-g to docstring and changed implementation to conform to coding style
Diffstat (limited to 'alot/widgets/globals.py')
-rw-r--r--alot/widgets/globals.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/alot/widgets/globals.py b/alot/widgets/globals.py
index b636a3af..b72c742e 100644
--- a/alot/widgets/globals.py
+++ b/alot/widgets/globals.py
@@ -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
@@ -168,9 +168,7 @@ class CompleteEdit(urwid.Edit):
self.set_edit_text(self.history[self.historypos])
elif key == 'enter':
self.on_exit(self.edit_text)
- elif key == 'esc':
- self.on_exit(None)
- elif key == 'ctrl g':
+ elif key in ('ctrl g', 'esc'):
self.on_exit(None)
elif key == 'ctrl a':
self.set_edit_pos(0)