diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2011-09-04 03:52:01 +0200 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2011-09-04 04:15:25 +0200 |
commit | c0f572131b640fe983fa56ebe6b0377a0e75b05e (patch) | |
tree | 14b8f0d8c12edcd749b219ce6e87125252202bfc /apps | |
parent | 68bf0afb5642a67761877b61cdc3a90fe0668c18 (diff) | |
download | mupdf-c0f572131b640fe983fa56ebe6b0377a0e75b05e.tar.xz |
Fix panning bug in viewer related to backwards search.
Searching backwards in the document for a non-existing string
resulted in the window being redrawn with no document. Until
next repaint, at which point the window was redrawn again this
time with the document present.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/pdfapp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/pdfapp.c b/apps/pdfapp.c index 8abc1e1e..e8575085 100644 --- a/apps/pdfapp.c +++ b/apps/pdfapp.c @@ -559,7 +559,7 @@ static int match(char *s, fz_text_span *span, int n) return n - orig; } -static void pdfapp_searchforward(pdfapp_t *app) +static void pdfapp_searchforward(pdfapp_t *app, enum panning *panto) { int matchlen; int test; @@ -597,7 +597,7 @@ static void pdfapp_searchforward(pdfapp_t *app) app->pageno = 1; pdfapp_showpage(app, 1, 0, 0); - app->pany = 0; + *panto = PAN_TO_TOP; } while (app->pageno != startpage); @@ -607,7 +607,7 @@ static void pdfapp_searchforward(pdfapp_t *app) wincursor(app, HAND); } -static void pdfapp_searchbackward(pdfapp_t *app) +static void pdfapp_searchbackward(pdfapp_t *app, enum panning *panto) { int matchlen; int test; @@ -645,7 +645,7 @@ static void pdfapp_searchbackward(pdfapp_t *app) app->pageno = app->pagecount; pdfapp_showpage(app, 1, 0, 0); - app->pany = -2000; + *panto = PAN_TO_BOTTOM; } while (app->pageno != startpage); @@ -913,13 +913,13 @@ void pdfapp_onkey(pdfapp_t *app, int c) break; case 'n': - pdfapp_searchforward(app); + pdfapp_searchforward(app, &panto); winrepaint(app); loadpage = 0; break; case 'N': - pdfapp_searchbackward(app); + pdfapp_searchbackward(app, &panto); winrepaint(app); loadpage = 0; break; |