use underline instead of color for default choice

This commit is contained in:
Kovid Goyal 2022-01-22 12:35:43 +05:30
parent d219654387
commit d4e7587686
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -215,8 +215,7 @@ class Choose(Handler):
for letter, choice in self.choices.items(): for letter, choice in self.choices.items():
text = choice.text[:choice.idx] text = choice.text[:choice.idx]
color = choice.color or ('yellow' if letter == self.response_on_accept else 'green') text += styled(choice.text[choice.idx], fg=choice.color or 'green', underline='straight' if letter == self.response_on_accept else None)
text += styled(choice.text[choice.idx], fg=color)
text += choice.text[choice.idx + 1:] text += choice.text[choice.idx + 1:]
text += ' ' text += ' '
sz = wcswidth(text) sz = wcswidth(text)