Make navigate_frame command respect a count prefix

This commit is contained in:
Bert Münnich 2015-12-26 15:24:08 +01:00
parent 4db3029bc6
commit f75fa78eca
3 changed files with 9 additions and 3 deletions

View file

@ -122,7 +122,7 @@ of small previews is displayed, making it easy to choose an image to open.
n,Space Go [count] images forward n,Space Go [count] images forward
p,Backspace Go [count] images backward p,Backspace Go [count] images backward
[,] Go [count] * 10 images backward/forward [,] Go [count] * 10 images backward/forward
Ctrl-n,p Go to the next/previous frame of a multi-frame image Ctrl-n,p Go [count] frames of a multi-frame image forward/backward
Ctrl-Space Play/stop animations of multi-frame images Ctrl-Space Play/stop animations of multi-frame images
h,j,k,l Scroll image 1/5 of window width/height or [count] pixels h,j,k,l Scroll image 1/5 of window width/height or [count] pixels
left/down/up/right (also with arrow keys) left/down/up/right (also with arrow keys)

View file

@ -289,6 +289,8 @@ bool ci_alternate(arg_t _)
bool ci_navigate_frame(arg_t d) bool ci_navigate_frame(arg_t d)
{ {
if (prefix > 0)
d *= prefix;
return !img.multi.animate && img_frame_navigate(&img, d); return !img.multi.animate && img_frame_navigate(&img, d);
} }

8
sxiv.1
View file

@ -228,10 +228,14 @@ Go
.SS Handle multi-frame images .SS Handle multi-frame images
.TP .TP
.B Ctrl-n .B Ctrl-n
Go to the next frame of a multi-frame image. Go
.I count
frames of a multi-frame image forward.
.TP .TP
.B Ctrl-p .B Ctrl-p
Go to the previous frame of a multi-frame image. Go
.I count
frames of a multi-frame image backward.
.TP .TP
.B Ctrl-Space .B Ctrl-Space
Play/stop animations of multi-frame images. Play/stop animations of multi-frame images.