diff options
Diffstat (limited to 'alot/command.py')
-rw-r--r-- | alot/command.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/alot/command.py b/alot/command.py index 0b77d814..fdf771d8 100644 --- a/alot/command.py +++ b/alot/command.py @@ -1057,6 +1057,16 @@ class TaglistSelectCommand(Command): ui.apply_command(cmd) +class MoveCommand(Command): + def __init__(self, direction, **kwargs): + Command.__init__(self, **kwargs) + self.direction = direction + + def apply(self, ui): + if self.direction in ['up', 'down', 'left', 'right', 'page down']: + ui.keypress(self.direction) + + COMMANDS = { 'search': { 'refine': (RefineCommand, {}), @@ -1093,6 +1103,7 @@ COMMANDS = { 'toggleheaders': (ToggleHeaderCommand, {}), }, 'global': { + 'move': (MoveCommand, {}), 'bnext': (BufferFocusCommand, {'offset': 1}), 'bprevious': (BufferFocusCommand, {'offset': -1}), 'bufferlist': (OpenBufferlistCommand, {}), @@ -1161,6 +1172,8 @@ def interpret_commandline(cmdline, mode): if cmd == 'search': return commandfactory(cmd, mode=mode, query=params) + if cmd == 'move': + return commandfactory(cmd, mode=mode, direction=params) elif cmd == 'compose': h = {} if params: |