]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SetupBrowserDxe/Ui.c
Fixed a bug on the menu display: Following steps to reproduce it:
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Ui.c
index 264bee6465a67b2d36afc363f8d1eb04e5d9507f..8b7344f42a8edec87aec62c29329cf9ab8cc1229 100644 (file)
@@ -2696,14 +2696,19 @@ UiDisplayMenu (
           TopOfScreen = NewPos;\r
         }\r
 \r
-        Difference = MoveToNextStatement (TRUE, &NewPos);\r
-        if ((INTN) MenuOption->Row - (INTN) DistanceValue < (INTN) TopRow) {\r
+        Difference = MoveToNextStatement (TRUE, &NewPos);\r
+        PreviousMenuOption = MENU_OPTION_FROM_LINK (NewPos);\r
+        DistanceValue += PreviousMenuOption->Skip;\r
+        \r
+       if ((INTN) MenuOption->Row - (INTN) DistanceValue  < (INTN) TopRow) {\r
           if (Difference > 0) {\r
             //\r
             // Previous focus MenuOption is above the TopOfScreen, so we need to scroll\r
             //\r
             TopOfScreen = NewPos;\r
             Repaint     = TRUE;\r
+            SkipValue = 0;\r
+            OldSkipValue = 0;\r
           }\r
         }\r
         if (Difference < 0) {\r