summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Woelders <kim@woelders.dk>2021-12-13 11:34:07 +0100
committerKim Woelders <kim@woelders.dk>2021-12-18 23:05:29 +0100
commitf2d98a2c15d5280dba9e7f7f850656d9d6ae9eef (patch)
treee023dc6f8b5ad5f8b1df7c95f82c684fadfe7786
parent45575222f5fa2adfb254d7d6de5ed4ad18cc4483 (diff)
downloadimlib2-f2d98a2c15d5280dba9e7f7f850656d9d6ae9eef.tar.gz
imlib2_view: Add 'r' command to refresh
-rw-r--r--src/bin/imlib2_view.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/imlib2_view.c b/src/bin/imlib2_view.c
index 869a9d2..71c01cb 100644
--- a/src/bin/imlib2_view.c
+++ b/src/bin/imlib2_view.c
@@ -355,6 +355,8 @@ main(int argc, char **argv)
case XK_q:
case XK_Escape:
goto quit;
+ case XK_r:
+ goto show_cur;
case XK_Right:
goto show_next;
case XK_Left:
@@ -441,6 +443,9 @@ main(int argc, char **argv)
}
break;
+ show_cur:
+ inc = 0;
+ goto show_next_prev;
show_next:
inc = 1;
goto show_next_prev;
@@ -461,7 +466,7 @@ main(int argc, char **argv)
inc = 1;
continue;
}
- if (no2 == no)
+ if (no2 == no && inc != 0)
break;
im2 = load_image(no2, argv[no2]);
if (!im2)