Krolyxon
Commit 2f7bd16

Branches

Refs →

nsxiv2f7bd16

Added g/G mappings for goto first/last image

Author
Bert
Date
2011-01-22 23:37 +0100
Parent
bd6b05c
Commit
2f7bd169ea07be3b7f9cbcebfd9dc2082d9edd47

+14 −0

1 file changed

  1. M main.c +14 −0
M main.c View
@@ -168,6 +168,20 @@ void on_keypress(XEvent *ev) {
168168 changed = 1;
169169 }
170170 break;
171+ case 'g':
172+ if (fileidx != 0) {
173+ fileidx = 0;
174+ img_load(&img, filenames[fileidx]);
175+ changed = 1;
176+ }
177+ break;
178+ case 'G':
179+ if (fileidx != filecnt - 1) {
180+ fileidx = filecnt - 1;
181+ img_load(&img, filenames[fileidx]);
182+ changed = 1;
183+ }
184+ break;
171185
172186 /* zooming */
173187 case '+':