Also call ffload on the current slide in advance()
authorMarkus Teich <markus.teich@stusta.mhn.de>
Thu, 30 Jun 2016 14:57:31 +0000 (16:57 +0200)
committerMarkus Teich <markus.teich@stusta.mhn.de>
Thu, 30 Jun 2016 14:57:31 +0000 (16:57 +0200)
This fixes a bug where the image would not be loaded if the user setup a
keybinding which advances multiple slides at once. Then the preloading for the
previous/next slide in advance() would not catch that case and instead of an
image the text version (`@filename`) would be rendered on the slide.

sent.c

diff --git a/sent.c b/sent.c
index e4bea31ac224547f0468e9f956c69f7cc8cc7186..a9ca274cf0a9f2714ba1db89b0063ccd00e2e2b6 100644 (file)
--- a/sent.c
+++ b/sent.c
@@ -436,6 +436,7 @@ advance(const Arg *arg)
                if (slides[idx].img)
                        slides[idx].img->state &= ~(DRAWN | SCALED);
                idx = new_idx;
+               ffload(&slides[idx]);
                xdraw();
                if (slidecount > idx + 1)
                        ffload(&slides[idx + 1]);