summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-10-03 08:33:55 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-10-03 08:33:55 +0200
commit46a4253496ac2cc38450d347aa6fd05d0035a5ab (patch)
tree3be9c04091ff6ba68e5c9d24b47d49ee684b868e /src
parentd14ca5e4eabfb7f12a33fecb343854a09f937201 (diff)
feh_display_info: Allow state to be reset for successive calls
Required e.g. for feh --preload --thumbnails
Diffstat (limited to 'src')
-rw-r--r--src/filelist.c2
-rw-r--r--src/imlib.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/filelist.c b/src/filelist.c
index 91b6b89..177711c 100644
--- a/src/filelist.c
+++ b/src/filelist.c
@@ -271,7 +271,7 @@ gib_list *feh_file_info_preload(gib_list * list)
feh_display_status('.');
}
if (opt.verbose)
- fputs("\n", stdout);
+ feh_display_status(0);
if (remove_list) {
for (l = remove_list; l; l = l->next)
diff --git a/src/imlib.c b/src/imlib.c
index fc7fb16..443246d 100644
--- a/src/imlib.c
+++ b/src/imlib.c
@@ -730,6 +730,13 @@ void feh_display_status(char stat)
D(("filelist %p, filelist->next %p\n", filelist, filelist->next));
+ if (!stat) {
+ putc('\n', stdout);
+ init_len = 0;
+ i = 0;
+ return;
+ }
+
if (!init_len)
init_len = gib_list_length(filelist);