From 75b72db88d9118e7b94df2bc54521afe5aabddbd Mon Sep 17 00:00:00 2001 From: Patrick Totzke Date: Thu, 30 May 2013 17:50:51 +0100 Subject: make `move last` available if buffer allows it --- alot/commands/globals.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/alot/commands/globals.py b/alot/commands/globals.py index 42718f12..01d9bdfc 100644 --- a/alot/commands/globals.py +++ b/alot/commands/globals.py @@ -836,7 +836,11 @@ class MoveCommand(Command): ui.mainloop.process_input( ui.mainloop.screen_size[1]/2 * [self.movement.split()[-1]]) elif self.movement == 'first': - ui.current_buffer.focus_first() + if hasattr(ui.current_buffer, "focus_first"): + ui.current_buffer.focus_first() + elif self.movement == 'last': + if hasattr(ui.current_buffer, "focus_last"): + ui.current_buffer.focus_last() else: ui.notify('unknown movement: ' + self.movement, priority='error') -- cgit v1.2.3