diff options
author | Lucas Hoffmann <l-m-h@web.de> | 2017-08-05 01:31:45 +0200 |
---|---|---|
committer | Lucas Hoffmann <l-m-h@web.de> | 2017-08-05 01:32:48 +0200 |
commit | 29f2ae421bb13ff578dd4e305e0a46fe4fdc367e (patch) | |
tree | c82960ab702788e89b1937aa7c6153250922545d /alot | |
parent | 1008f595b859cc769da755f92a5f39930bc35117 (diff) |
Interpret unrecognized movements as search terms
The move command in thread buffers can recognize some predefined targets
to move to. All other arguments are interpreted as notmuch queries and
the next or previous matching message is moved to.
Diffstat (limited to 'alot')
-rw-r--r-- | alot/commands/thread.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py index 0c23b037..f565ceb3 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -1024,6 +1024,12 @@ class MoveFocusCommand(MoveCommand): tbuffer.focus_next_unfolded() elif self.movement == 'previous unfolded': tbuffer.focus_prev_unfolded() + elif self.movement.startswith('next '): + query = self.movement[5:].strip() + tbuffer.focus_next_matching(query) + elif self.movement.startswith('previous '): + query = self.movement[9:].strip() + tbuffer.focus_prev_matching(query) else: MoveCommand.apply(self, ui) # TODO add 'next matching' if threadbuffer stores the original query |