From 32432b2fdc950e6b884e79cc4f753670c050d321 Mon Sep 17 00:00:00 2001 From: Daniel Girtler Date: Tue, 17 May 2022 20:56:41 +1000 Subject: Fix padding calculation (#1205) Co-authored-by: Daniel Girtler --- archinstall/lib/menu/selection_menu.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/archinstall/lib/menu/selection_menu.py b/archinstall/lib/menu/selection_menu.py index 73ba1148..35057e9c 100644 --- a/archinstall/lib/menu/selection_menu.py +++ b/archinstall/lib/menu/selection_menu.py @@ -272,7 +272,8 @@ class GeneralMenu: return max([len(str(selection.description)) for selection in entries]) def _find_selection(self, selection_name: str) -> Tuple[str, Selector]: - padding = self._get_menu_text_padding(list(self._menu_options.values())) + enabled_menus = self._menus_to_enable() + padding = self._get_menu_text_padding(list(enabled_menus.values())) option = [(k, v) for k, v in self._menu_options.items() if v.menu_text(padding).strip() == selection_name.strip()] if len(option) != 1: -- cgit v1.2.3-70-g09d2