summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-01-22 23:37:13 +0100
committerBert <ber.t@gmx.com>2011-01-22 23:37:13 +0100
commit2f7bd169ea07be3b7f9cbcebfd9dc2082d9edd47 (patch)
tree8efaf0e55927ddac297970388f6092527a0fcc03 /main.c
parentbd6b05c0edbac5168651768d9473a804b00a649a (diff)
downloadnsxiv-2f7bd169ea07be3b7f9cbcebfd9dc2082d9edd47.tar.zst
Added g/G mappings for goto first/last image
Diffstat (limited to 'main.c')
-rw-r--r--main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/main.c b/main.c
index 5c29e8e..c7b102e 100644
--- a/main.c
+++ b/main.c
@@ -168,6 +168,20 @@ void on_keypress(XEvent *ev) {
changed = 1;
}
break;
+ case 'g':
+ if (fileidx != 0) {
+ fileidx = 0;
+ img_load(&img, filenames[fileidx]);
+ changed = 1;
+ }
+ break;
+ case 'G':
+ if (fileidx != filecnt - 1) {
+ fileidx = filecnt - 1;
+ img_load(&img, filenames[fileidx]);
+ changed = 1;
+ }
+ break;
/* zooming */
case '+':