UpdateOptionSkipLines (NextMenuOption);\r
}\r
\r
- if (IsSelectable (NextMenuOption)) {\r
- break;\r
- }\r
-\r
//\r
- // In this case, still can't find the selectable menu,\r
+ // Check whether the menu is beyond current showing form,\r
// return the first one beyond the showing form.\r
//\r
if ((UINTN) Distance + NextMenuOption->Skip > GapToTop) {\r
break;\r
}\r
\r
+ //\r
+ // return the selectable menu in the showing form.\r
+ //\r
+ if (IsSelectable (NextMenuOption)) {\r
+ break;\r
+ }\r
+\r
Distance += NextMenuOption->Skip;\r
\r
//\r