diff options
author | Sebastian Jeltsch <sjeltsch@kip.uni-heidelberg.de> | 2013-04-19 17:19:01 +0200 |
---|---|---|
committer | Sebastian Jeltsch <sjeltsch@kip.uni-heidelberg.de> | 2013-04-20 21:14:11 +0200 |
commit | 8647ba703142e3a93d6f89f5d7454eda59ba06ca (patch) | |
tree | 0a0cbf8c1d11a87a7643e5880d69183bdb12ab9f /alot/commands/search.py | |
parent | 8189b587b25af5cf98095158a625f75c60f8c354 (diff) |
more vim-like movements
added:
* ctrl d = half page down
* ctrl u = half page up
* G = focus last entry (only search buffer for now)
Diffstat (limited to 'alot/commands/search.py')
-rw-r--r-- | alot/commands/search.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/alot/commands/search.py b/alot/commands/search.py index db718807..04da8f96 100644 --- a/alot/commands/search.py +++ b/alot/commands/search.py @@ -6,6 +6,7 @@ import logging from alot.commands import Command, registerCommand from alot.commands.globals import PromptCommand +from alot.commands.globals import MoveCommand from alot.db.errors import DatabaseROError from alot import commands @@ -228,3 +229,15 @@ class TagCommand(Command): # flush index if self.flush: ui.apply_command(commands.globals.FlushCommand(callback=refresh)) + +@registerCommand(MODE, 'move', help='move focus in search buffer', + arguments=[(['movement'], { + 'nargs': argparse.REMAINDER, + 'help': 'last'})]) +class MoveFocusCommand(MoveCommand): + def apply(self, ui): + logging.debug(self.movement) + if self.movement == 'last': + ui.current_buffer.focus_last() + else: + MoveCommand.apply(self, ui) |