Also call ffload on the current slide in advance()
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.
This commit is contained in:
parent
827f3de2e7
commit
e1a0b51d84
1
sent.c
1
sent.c
@ -436,6 +436,7 @@ advance(const Arg *arg)
|
|||||||
if (slides[idx].img)
|
if (slides[idx].img)
|
||||||
slides[idx].img->state &= ~(DRAWN | SCALED);
|
slides[idx].img->state &= ~(DRAWN | SCALED);
|
||||||
idx = new_idx;
|
idx = new_idx;
|
||||||
|
ffload(&slides[idx]);
|
||||||
xdraw();
|
xdraw();
|
||||||
if (slidecount > idx + 1)
|
if (slidecount > idx + 1)
|
||||||
ffload(&slides[idx + 1]);
|
ffload(&slides[idx + 1]);
|
||||||
|
Loading…
Reference in New Issue
Block a user