projects
/
profile
/
ivi
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c9cddae
)
If we're showing a scrollbar, always show at least one unit
author
H. Peter Anvin
<hpa@zytor.com>
Sat, 16 Feb 2008 08:13:50 +0000
(
00:13
-0800)
committer
H. Peter Anvin
<hpa@zytor.com>
Sat, 16 Feb 2008 08:13:50 +0000
(
00:13
-0800)
In the simple menu system, if we're showing a scrollbar at all, always
show at least one unit of it.
com32/menu/menumain.c
patch
|
blob
|
history
diff --git
a/com32/menu/menumain.c
b/com32/menu/menumain.c
index
ff01328
..
4dbc66c
100644
(file)
--- a/
com32/menu/menumain.c
+++ b/
com32/menu/menumain.c
@@
-415,7
+415,7
@@
draw_menu(int sel, int top, int edit_line)
if ( nentries > MENU_ROWS ) {
int sblen = MENU_ROWS*MENU_ROWS/nentries;
sbtop = (MENU_ROWS-sblen+1)*top/(nentries-MENU_ROWS+1);
- sbbot =
sbtop + sblen - 1
;
+ sbbot =
max(sbtop, sbtop+sblen-1)
;
sbtop += 4; sbbot += 4; /* Starting row of scrollbar */
}