summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-07-18 16:34:41 -0700
committerDylan Baker <dylan@pnwbakers.com>2018-07-18 16:34:41 -0700
commit247aaeb8a1476988140ee24ce8999bf03dc40fea (patch)
tree7372b3f85d72992d2740148866cdca785b02e9a1 /alot
parent920043b3f7dc039c9e75aa62134cc662dfa94fda (diff)
widgets/globals: inverse search keys (up/down)
This has really annoyed me for a while, the search is reversed from vim. In alot currently up is older searches, whiles down is newer. In vim it's reversed.
Diffstat (limited to 'alot')
-rw-r--r--alot/widgets/globals.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/alot/widgets/globals.py b/alot/widgets/globals.py
index 470a517f..7ac1332c 100644
--- a/alot/widgets/globals.py
+++ b/alot/widgets/globals.py
@@ -166,9 +166,9 @@ class CompleteEdit(urwid.Edit):
self.history.append(self.edit_text)
self.historypos = len(self.history) - 1
if key == 'up':
- self.historypos = (self.historypos + 1) % len(self.history)
- else:
self.historypos = (self.historypos - 1) % len(self.history)
+ else:
+ self.historypos = (self.historypos + 1) % len(self.history)
self.set_edit_text(self.history[self.historypos])
elif key == 'enter':
self.on_exit(self.edit_text)