From f2a3d73212ad63e1081278347c189f2554cab8a4 Mon Sep 17 00:00:00 2001 From: Bert Münnich Date: Thu, 16 Aug 2012 13:40:04 +0200 Subject: New command: i_alternate, go to last image, issue #65 --- commands.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'commands.c') diff --git a/commands.c b/commands.c index 8868091..e742016 100644 --- a/commands.c +++ b/commands.c @@ -46,6 +46,7 @@ extern win_t win; extern fileinfo_t *files; extern int filecnt, fileidx; +extern int alternate; extern int prefix; @@ -155,6 +156,15 @@ bool i_navigate(arg_t a) { return false; } +bool i_alternate(arg_t a) { + if (mode == MODE_IMAGE) { + load_image(alternate); + return true; + } else { + return false; + } +} + bool it_first(arg_t a) { if (mode == MODE_IMAGE && fileidx != 0) { load_image(0); -- cgit v1.2.3-54-g00ecf