summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/gl/gl-main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/platform/gl/gl-main.c b/platform/gl/gl-main.c
index ec38f6f7..74e03cd3 100644
--- a/platform/gl/gl-main.c
+++ b/platform/gl/gl-main.c
@@ -849,22 +849,23 @@ static void load_document(void)
fz_catch(ctx)
outline = NULL;
+ load_history();
+
pdf = pdf_specifics(ctx, doc);
if (pdf)
{
if (enable_js)
pdf_enable_js(ctx, pdf);
if (anchor)
- currentpage = pdf_lookup_anchor(ctx, pdf, anchor, NULL, NULL);
+ jump_to_page(pdf_lookup_anchor(ctx, pdf, anchor, NULL, NULL));
}
else
{
if (anchor)
- currentpage = fz_atoi(anchor) - 1;
+ jump_to_page(fz_atoi(anchor) - 1);
}
anchor = NULL;
- load_history();
currentpage = fz_clampi(currentpage, 0, fz_count_pages(ctx, doc) - 1);
}