Matt Sephton
2012-Sep-05 09:53 UTC
[syslinux] Final line of menu selectable even if it is disabled
I have a menu conf as follows: LABEL enabled, use as item LABEL disabled, use as description SEPARATOR LABEL enabled, use as item LABEL disabled, use as description In this situation, I expect the cursors to be able to select from only the two enabled lines. However, the final disabled line is also selectable. Even if I put a final separator and/or disabled label the final line of the menu is still selectable. Full conf: http://pastebin.com/U6zQVbt6 So there seems to be an edge case scenario that means the final line of a menu is selectable when it should not be. Any thoughts? matt
Ady Ady
2012-Sep-05 15:28 UTC
[syslinux] Final line of menu selectable even if it is disabled
> From: matt.sephton at gmail.com > Date: Wed, 5 Sep 2012 10:53:41 +0100 > To: Syslinux at zytor.com > Subject: [syslinux] Final line of menu selectable even if it is disabled > > I have a menu conf as follows: > > LABEL enabled, use as item > LABEL disabled, use as description > SEPARATOR > LABEL enabled, use as item > LABEL disabled, use as description > > In this situation, I expect the cursors to be able to select from only the two enabled lines. > > However, the final disabled line is also selectable. > > Even if I put a final separator and/or disabled label the final line of the menu is still selectable. > > Full conf: http://pastebin.com/U6zQVbt6 > > So there seems to be an edge case scenario that means the final line of a menu is selectable when it should not be. > > Any thoughts? >It was already noted by someone else before ( see http://www.syslinux.org/archives/2012-April/017463.html ) but I don't know if something was done about it. To be accurate, the specific "disabled" menu entry is "selectable" (while it shouldn't), but other than that, you can't do anything with it; you can't actually take any action, other than to select a different entry. In other words, while that last "disabled" menu entry is "selected", keys like "tab" and "enter" are not going to do anything. Yet, strictly speaking, that menu entry shouldn?t be "selectable".
Matt Sephton
2012-Sep-06 20:57 UTC
[syslinux] Final line of menu selectable even if it is disabled
On 6 Sep 2012, at 21:53, Gene Cumm <gene.cumm at gmail.com> wrote:> On Sep 6, 2012 9:14 AM, "Matt Sephton" <matt.sephton at gmail.com> wrote: > >> Let me know if there is an official bug tracker and I will report it there > > At the moment, this is as close to a bug tracker as you get.OK, thanks :)
Gene Cumm
2012-Sep-06 21:45 UTC
[syslinux] Final line of menu selectable even if it is disabled
On Sep 5, 2012 6:50 AM, "Matt Sephton" <matt.sephton at gmail.com> wrote:> > I have a menu conf as follows: > > LABEL enabled, use as item > LABEL disabled, use as description > SEPARATOR > LABEL enabled, use as item > LABEL disabled, use as description > > In this situation, I expect the cursors to be able to select from onlythe two enabled lines.> > However, the final disabled line is also selectable. > > Even if I put a final separator and/or disabled label the final line ofthe menu is still selectable.> > Full conf: http://pastebin.com/U6zQVbt6 > > So there seems to be an edge case scenario that means the final line of amenu is selectable when it should not be.> > Any thoughts? > > mattI presume that when you add one more LABEL at the end, the LABEL that's currently at the end is no longer selectable? --Gene
Matt Fleming
2012-Oct-09 12:10 UTC
[syslinux] Final line of menu selectable even if it is disabled
On Wed, 2012-09-05 at 10:53 +0100, Matt Sephton wrote:> I have a menu conf as follows: > > LABEL enabled, use as item > LABEL disabled, use as description > SEPARATOR > LABEL enabled, use as item > LABEL disabled, use as description > > In this situation, I expect the cursors to be able to select from only the two enabled lines. > > However, the final disabled line is also selectable. > > Even if I put a final separator and/or disabled label the final line of the menu is still selectable. > > Full conf: http://pastebin.com/U6zQVbt6 > > So there seems to be an edge case scenario that means the final line of a menu is selectable when it should not be. > > Any thoughts?Matt, it does indeed look like you're hitting an edge case. Could you apply the following patch on top of 4.06-pre12 and see whether your issue is resolved? diff --git a/com32/menu/menumain.c b/com32/menu/menumain.c index 5b3f6bd..7c58979 100644 --- a/com32/menu/menumain.c +++ b/com32/menu/menumain.c @@ -958,8 +958,7 @@ static const char *run_menu(void) case KEY_DOWN: case KEY_CTRL('N'): - while (entry < cm->nentries - 1) { - entry++; + while (++entry < cm->nentries) { if (entry >= top + MENU_ROWS) top += MENU_ROWS; if (!is_disabled(cm->menu_entries[entry])) -- Matt Fleming, Intel Open Source Technology Center