Re: [patch] viewer lockup due to recent signed->unsigned change
- From: Roland Illig <roland illig gmx de>
- To: Jindrich Makovicka <makovick kmlinux fjfi cvut cz>
- Cc: mc-devel gnome org
- Subject: Re: [patch] viewer lockup due to recent signed->unsigned change
- Date: Thu, 19 Aug 2004 19:13:48 +0200
Roland Illig wrote:
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>.
Sorry for not checking thoroughly. And sorry for always saying sorry. ;)
I just discovered that the "two-lines-up" bug already existed in
mc-4.6.0. I'll nevertheless try to fix it. And I will commit the change
as suggested by Leonard, as it looks simpler and almost does the same.
Roland
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]