aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2015-12-26 15:24:08 +0100
committerBert Münnich <ber.t@posteo.de>2015-12-26 15:24:08 +0100
commitf75fa78ecaea43204e5e6abdf568139a7b621d6d (patch)
tree895b71e9ca8047d2f0f51898fdd6a8a5aaca9840
parent4db3029bc609043f4aa029b36f9d1e9dfcc5e8e2 (diff)
Make navigate_frame command respect a count prefix
-rw-r--r--README.md2
-rw-r--r--commands.c2
-rw-r--r--sxiv.18
3 files changed, 9 insertions, 3 deletions
diff --git a/README.md b/README.md
index 75ce0e0..eb74073 100644
--- a/README.md
+++ b/README.md
@@ -122,7 +122,7 @@ of small previews is displayed, making it easy to choose an image to open.
n,Space Go [count] images forward
p,Backspace Go [count] images backward
[,] 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
h,j,k,l Scroll image 1/5 of window width/height or [count] pixels
left/down/up/right (also with arrow keys)
diff --git a/commands.c b/commands.c
index ab1e805..7b0f457 100644
--- a/commands.c
+++ b/commands.c
@@ -289,6 +289,8 @@ bool ci_alternate(arg_t _)
bool ci_navigate_frame(arg_t d)
{
+ if (prefix > 0)
+ d *= prefix;
return !img.multi.animate && img_frame_navigate(&img, d);
}
diff --git a/sxiv.1 b/sxiv.1
index 4756150..6777b36 100644
--- a/sxiv.1
+++ b/sxiv.1
@@ -228,10 +228,14 @@ Go
.SS Handle multi-frame images
.TP
.B Ctrl-n
-Go to the next frame of a multi-frame image.
+Go
+.I count
+frames of a multi-frame image forward.
.TP
.B Ctrl-p
-Go to the previous frame of a multi-frame image.
+Go
+.I count
+frames of a multi-frame image backward.
.TP
.B Ctrl-Space
Play/stop animations of multi-frame images.