diff options
author | Lucas Hoffmann <lucc@users.noreply.github.com> | 2018-07-19 12:54:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-19 12:54:32 +0200 |
commit | 765eb323bf3b2aeadff2dc41f0dbd91094eaf7eb (patch) | |
tree | 7372b3f85d72992d2740148866cdca785b02e9a1 | |
parent | 920043b3f7dc039c9e75aa62134cc662dfa94fda (diff) | |
parent | 247aaeb8a1476988140ee24ce8999bf03dc40fea (diff) |
Merge pull request #1271 from dcbaker/reversed-search
widgets/globals: inverse search keys (up/down)
-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) |