kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2.git/commit/?id=baaddf9366aea48bbdf26b9191f538f895e79fba
commit baaddf9366aea48bbdf26b9191f538f895e79fba Author: Kim Woelders <[email protected]> Date: Sun Nov 17 06:03:49 2019 +0100 imlib2_view: Fix next/prev selection if last/first image is bad --- src/bin/imlib2_view.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/bin/imlib2_view.c b/src/bin/imlib2_view.c index d98da4a..26f5dec 100644 --- a/src/bin/imlib2_view.c +++ b/src/bin/imlib2_view.c @@ -326,9 +326,15 @@ main(int argc, char **argv) { no += inc; if (no >= argc) - no = argc - 1; - else if (no <= 0) - no = 0; + { + inc = -1; + continue; + } + else if (no < 0) + { + inc = 1; + continue; + } file = argv[no]; if (verbose) printf("Show %d: '%s'\n", no, file); --
