Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
authorDaniel Girtler <blackrabbit256@gmail.com>2022-05-06 22:37:40 +1000
committerGitHub <noreply@github.com>2022-05-06 14:37:40 +0200
commit050d7c9c13fdcf766511bc2ced5813ef1730478c (patch)
tree845ecd9a19c9fb35dbf507e8b485522d39f8f4e5 /archinstall/lib
parent184373ee84eb566184685f965549a7cf4b2b3df3 (diff)
Fix minor issues (#1132)
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/menu/menu.py1
-rw-r--r--archinstall/lib/menu/selection_menu.py11
2 files changed, 10 insertions, 2 deletions
diff --git a/archinstall/lib/menu/menu.py b/archinstall/lib/menu/menu.py
index 48ea4635..b2f4146d 100644
--- a/archinstall/lib/menu/menu.py
+++ b/archinstall/lib/menu/menu.py
@@ -160,6 +160,7 @@ class Menu(TerminalMenu):
preview_command=preview_command,
preview_size=preview_size,
preview_title=preview_title,
+ multi_select_select_on_accept=False,
**kwargs,
)
diff --git a/archinstall/lib/menu/selection_menu.py b/archinstall/lib/menu/selection_menu.py
index c29373f9..8311344d 100644
--- a/archinstall/lib/menu/selection_menu.py
+++ b/archinstall/lib/menu/selection_menu.py
@@ -309,8 +309,15 @@ class GeneralMenu:
if selection and self.auto_cursor:
cursor_pos = menu_options.index(selection) + 1 # before the strip otherwise fails
- if cursor_pos >= len(menu_options):
- cursor_pos = len(menu_options) - 1
+
+ # in case the new position lands on a "placeholder" we'll skip them as well
+ while True:
+ if cursor_pos >= len(menu_options):
+ cursor_pos = 0
+ if len(menu_options[cursor_pos]) > 0:
+ break
+ cursor_pos += 1
+
selection = selection.strip()
if selection:
# if this calls returns false, we exit the menu. We allow for an callback for special processing on realeasing control