[patch] viewer lockup due to recent signed->unsigned change
Roland Illig
roland.illig at gmx.de
Thu Aug 19 17:07:35 UTC 2004
Jindrich Makovicka wrote:
> Oops... I shouldn't use alpha version of Mozilla... here it goes.
>
> --- view.c.orig 2004-08-17 17:51:30.000000000 +0200
> +++ view.c 2004-08-19 18:10:55.000000000 +0200
> @@ -1296,7 +1296,7 @@
> line = 1;
> else
> line = 0;
> - for (q = p = current - 1; p >= view->first; p--)
> + for (q = p = current - 1;; p--) {
> if (get_byte (view, p) == '\n' || p == view->first) {
> pm = p > view->first ? p + 1 : view->first;
> if (!view->wrap_mode) {
> @@ -1315,6 +1315,9 @@
> q = p + 1;
> }
> }
> + if (p <= view->first) break;
> + }
> +
> }
> return p > view->first ? p : view->first;
> }
>
>
Sorry that I intruduced this bug. I'm afraid fixing this bug will not be
that easy. If you apply your patch and create a file whose first lines
are empty, you will jump from line 3 upto line 1 when continuously
pressing <up>.
I'll work on this.
Roland
More information about the mc-devel
mailing list