Skip to content

Commit

Permalink
fix: respect symbol length
Browse files Browse the repository at this point in the history
If a symbol is more than one character, the rest of the choices still appear with a single indent, which moves choices around when changing choices.
  • Loading branch information
GetPsyched authored and Cube707 committed Jun 14, 2024
1 parent 3ddfa7c commit 3ae648b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/inquirer/render/console/_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def get_options(self):
symbol = "+" if choice == GLOBAL_OTHER_CHOICE else self.theme.List.selection_cursor
else:
color = self.theme.List.unselected_color
symbol = " "
symbol = " " if choice == GLOBAL_OTHER_CHOICE else " " * len(self.theme.List.selection_cursor)
yield choice, symbol, color

def process_input(self, pressed):
Expand Down

0 comments on commit 3ae648b

Please sign in to comment.