diff --git a/LemonUI/Menus/NativeMenu.cs b/LemonUI/Menus/NativeMenu.cs index c88e6de..2e0e92f 100644 --- a/LemonUI/Menus/NativeMenu.cs +++ b/LemonUI/Menus/NativeMenu.cs @@ -1801,10 +1801,16 @@ public void Previous() return; } - int nextIndex = SelectedIndex; + int initialIndex = SelectedIndex; + int nextIndex = initialIndex; while (true) { + if (nextIndex == initialIndex) + { + return; + } + nextIndex -= 1; if (nextIndex < 0) @@ -1837,10 +1843,16 @@ public void Next() return; } - int nextIndex = SelectedIndex; + int initialIndex = SelectedIndex; + int nextIndex = initialIndex; while (true) { + if (nextIndex == initialIndex) + { + return; + } + nextIndex += 1; if (nextIndex >= Items.Count)