aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/page/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/page/cache.c')
-rw-r--r--src/cmd/page/cache.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cmd/page/cache.c b/src/cmd/page/cache.c
index 0063a339..5110840f 100644
--- a/src/cmd/page/cache.c
+++ b/src/cmd/page/cache.c
@@ -168,7 +168,12 @@ raproc(void *a)
c = a;
lockdisplay(display);
- _cachedpage(c->doc, c->angle, c->page, "-ra");
+ /*
+ * If there is only one page in a fwdonly file, we may reach EOF
+ * while doing readahead and page will exit without showing anything.
+ */
+ if(!c->doc->fwdonly)
+ _cachedpage(c->doc, c->angle, c->page, "-ra");
rabusy = 0;
unlockdisplay(display);
free(c);