Merge "Make the recovery menus wrap."
diff --git a/screen_ui.cpp b/screen_ui.cpp
index 03ef049..5e3a24f 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -526,8 +526,11 @@
     if (show_menu > 0) {
         old_sel = menu_sel;
         menu_sel = sel;
-        if (menu_sel < 0) menu_sel = 0;
-        if (menu_sel >= menu_items) menu_sel = menu_items-1;
+
+        // Wrap at top and bottom.
+        if (menu_sel < 0) menu_sel = menu_items - 1;
+        if (menu_sel >= menu_items) menu_sel = 0;
+
         sel = menu_sel;
         if (menu_sel != old_sel) update_screen_locked();
     }