diff options
author | Harry Jeffery <harry@exec64.co.uk> | 2019-01-31 00:17:29 +0000 |
---|---|---|
committer | Harry Jeffery <harry@exec64.co.uk> | 2019-01-31 00:19:42 +0000 |
commit | c46924345fc0ef7574e864127c164d72c1fd3011 (patch) | |
tree | 4f0e38aa8d8e01d73406ce666ec4fb75f782633b /src | |
parent | 35c81938f39b0767eb63fd8af589d7eb1d24ce8f (diff) | |
download | imv-c46924345fc0ef7574e864127c164d72c1fd3011.tar.gz |
imv: Close unsupported images more rapidly
Diffstat (limited to 'src')
-rw-r--r-- | src/imv.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -700,8 +700,12 @@ int imv_run(struct imv *imv) continue; } - /* if the user has changed image, start loading the new one */ - if(imv_navigator_poll_changed(imv->navigator)) { + /* If the user has changed image, start loading the new one. It's possible + * that there are lots of unsupported files listed back to back, so we + * may immediate close one and navigate onto the next. So we attempt to + * load in a while loop until the navigation stops. + */ + while (imv_navigator_poll_changed(imv->navigator)) { const char *current_path = imv_navigator_selection(imv->navigator); /* check we got a path back */ if(strcmp("", current_path)) { |