lkml.org 
[lkml]   [1997]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectpatch for lxdialog
Bug description: in menubox.c print_item was called when the window
was scrollable. When this happened for the last line in the window,
the window scrolled one more line than was needed.

Repeat: In selection of network device, press page-down from the first
line in the list.

patch (for 2.1.25, probably for much earlier ones):
--- menubox.c.orig Tue Feb 4 01:49:41 1997
+++ menubox.c Tue Feb 4 01:51:38 1997
@@ -261,26 +261,26 @@
choice = MIN(choice+1, max_choice-1);

} else if (key == KEY_PPAGE) {
- scrollok (menu, TRUE);
for (i=0; (i < max_choice) && (scroll > 0); i++) {
+ scrollok (menu, TRUE);
wscrl (menu, -1);
+ scrollok (menu, FALSE);
scroll--;
print_item (menu, items[scroll * 2 + 1], 0, FALSE,
(items[scroll*2][0] != ':'));
}
- scrollok (menu, FALSE);
choice = 0;

} else if (key == KEY_NPAGE) {
- scrollok (menu, TRUE);
for (i=0; (i < max_choice) && (scroll+max_choice < item_no); i++) {
+ scrollok (menu, TRUE);
scroll(menu);
+ scrollok (menu, FALSE);
scroll++;
print_item (menu, items[(scroll+max_choice-1)*2+1],
max_choice-1, FALSE,
(items[(scroll+max_choice-1)*2][0] != ':'));
}
- scrollok (menu, FALSE);
choice = 0;

} else
\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.034 / U:4.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site