aboutsummaryrefslogtreecommitdiffstats
path: root/commands.c
diff options
context:
space:
mode:
authorBert Münnich <be.muennich@googlemail.com>2012-08-16 13:40:04 +0200
committerBert Münnich <be.muennich@googlemail.com>2012-08-16 13:40:04 +0200
commitf2a3d73212ad63e1081278347c189f2554cab8a4 (patch)
tree150d3afcf0ff699e153f7b537c30769aede35968 /commands.c
parent8a652a786c2edc5f630d6f032d8ef775cdea9142 (diff)
downloadnsxiv-f2a3d73212ad63e1081278347c189f2554cab8a4.tar.zst
New command: i_alternate, go to last image, issue #65
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c10
1 files changed, 10 insertions, 0 deletions
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);