diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-10-03 08:33:55 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-10-03 08:33:55 +0200 |
commit | 46a4253496ac2cc38450d347aa6fd05d0035a5ab (patch) | |
tree | 3be9c04091ff6ba68e5c9d24b47d49ee684b868e /src | |
parent | d14ca5e4eabfb7f12a33fecb343854a09f937201 (diff) | |
download | feh-46a4253496ac2cc38450d347aa6fd05d0035a5ab.zip |
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.c | 2 | ||||
-rw-r--r-- | src/imlib.c | 7 |
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); |