Re: lxdialog: checklist.c patch

Michael Elizabeth Chastain (mec@shout.net)
Mon, 23 Feb 1998 13:43:25 -0600


Hi Alexander,
Hi Linus,

Alexander Lukyanov wrote:
> The following patch fixes a bug in checklist.c. The bug can be seen
> when a long list is passed to lxdialog and current item is below
> the window height. This is so in Alpha system type choice.

You are right, and this is the right fix. I've tested it on my system
and it works perfectly.

Linus, would you please apply Alexander's patch to the file
scripts/lxdialog/checklist.c in 2.1.88. Thanks.

Regards,

Michael Chastain
<mailto:mec@shout.net>
"love without fear"

===

--- checklist.c.old Fri Feb 20 20:54:34 1998
+++ checklist.c Fri Feb 20 21:05:48 1998
@@ -188,9 +188,16 @@
check_x = (list_width - check_x) / 2;
item_x = check_x + 4;

+ if (choice >= list_height) {
+ scroll = choice - list_height + 1;
+ choice -= scroll;
+ }
+
/* Print the list */
- for (i = 0; i < max_choice; i++)
- print_item (list, items[i * 3 + 1], status[i], i, i == choice);
+ for (i = 0; i < max_choice; i++) {
+ print_item (list, items[(scroll+i) * 3 + 1],
+ status[i+scroll], i, i == choice);
+ }

wnoutrefresh (list);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu