On 2019/09/17 10:45, Theo Buehler wrote:
> The space key on the penultimate page doesn't work due to an off-by-one.
> This is a genuine bug.
OK.
> The backspace mapping was apparently deliberately removed (just like
> '\r', '\n', '=', 'L', 'R' and perhaps others), so I'm less sure we
> should fix it. Diff below contains the trivial fix for it as well.
There are enough assorted random patches in mupdf anyway I don't think
it hurts to add this extra small one. To help trigger my memory when
I merge patches in the future, could you add /* backspace */ on the
line please? \b is uncommon enough that I won't recognise it directly.
> Index: Makefile
> ===================================================================
> RCS file: /var/cvs/ports/textproc/mupdf/Makefile,v
> retrieving revision 1.91
> diff -u -p -r1.91 Makefile
> --- Makefile 3 Aug 2019 19:16:22 -0000 1.91
> +++ Makefile 17 Sep 2019 08:43:28 -0000
> @@ -5,6 +5,7 @@ COMMENT = graphic library, pdf parser, v
> V = 1.16.1
> DISTNAME = mupdf-$V-source
> PKGNAME = mupdf-${V:S/-rc/rc/}
> +REVISION = 0
>
> CATEGORIES = textproc x11
>
> Index: patches/patch-platform_x11_pdfapp_c
> ===================================================================
> RCS file: /var/cvs/ports/textproc/mupdf/patches/patch-platform_x11_pdfapp_c,v
> retrieving revision 1.13
> diff -u -p -r1.13 patch-platform_x11_pdfapp_c
> --- patches/patch-platform_x11_pdfapp_c 3 Aug 2019 19:16:22 -0000 1.13
> +++ patches/patch-platform_x11_pdfapp_c 17 Sep 2019 08:31:44 -0000
> @@ -28,7 +28,24 @@ Index: platform/x11/pdfapp.c
> static int zoom_in(int oldres)
> {
> int i;
> -@@ -1613,9 +1623,9 @@ static void handlescroll(pdfapp_t *app, int modifiers,
> +@@ -1471,6 +1481,7 @@ void pdfapp_onkey(pdfapp_t *app, int c, int modifiers)
> + app->pageno++;
> + break;
> +
> ++ case '\b':
> + case 'b':
> + if (app->pany >= 0)
> + {
> +@@ -1503,7 +1514,7 @@ void pdfapp_onkey(pdfapp_t *app, int c, int modifiers)
> + {
> + if (app->imgw + app->panx <= app->winw)
> + {
> +- if (app->pageno + 1 < app->pagecount)
> ++ if (app->pageno < app->pagecount)
> + {
> + app->panx = 0;
> + app->pany = 0;
> +@@ -1613,9 +1624,9 @@ static void handlescroll(pdfapp_t *app, int modifiers,
> {
> /* zoom in/out if ctrl is pressed */
> if (dir > 0)
No comments:
Post a Comment