diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2018-07-18 16:34:41 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2018-07-18 16:34:41 -0700 |
commit | 247aaeb8a1476988140ee24ce8999bf03dc40fea (patch) | |
tree | 7372b3f85d72992d2740148866cdca785b02e9a1 /alot | |
parent | 920043b3f7dc039c9e75aa62134cc662dfa94fda (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.py | 4 |
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) |