Skip to content

Commit 18c9a06

Browse files
authored
Fix invisible picker rows on light-mode terminals (#166)
1 parent 988b43c commit 18c9a06

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/ucode/mcp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,8 @@ def _picker_style() -> questionary.Style:
464464
return questionary.Style(
465465
[
466466
("pointer", "fg:cyan bold"),
467-
("highlighted", "fg:white noinherit"),
468-
("selected", "fg:white noinherit"),
467+
("highlighted", "noinherit"),
468+
("selected", "noinherit"),
469469
("answer", "fg:cyan"),
470470
]
471471
)

src/ucode/ui.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,13 @@ def prompt_for_tools(available: list[tuple[str, str]]) -> list[str]:
241241
"""
242242
style = questionary.Style(
243243
[
244-
# questionary applies `selected` to *checked* rows and
245-
# `highlighted` to the cursor row — overriding both to plain
246-
# white means only the indicator and the `›` pointer carry
247-
# signal, instead of the entire row inverting.
244+
# Theme-agnostic picker: every row renders in the terminal's
245+
# default foreground colour (`noinherit` strips the
246+
# prompt_toolkit defaults that would otherwise re-colour the
247+
# cursor row or every checked row).
248248
("pointer", "fg:cyan bold"),
249-
("highlighted", "fg:white noinherit"),
250-
("selected", "fg:white noinherit"),
249+
("highlighted", "noinherit"),
250+
("selected", "noinherit"),
251251
("answer", "fg:cyan"),
252252
]
253253
)

0 commit comments

Comments
 (0)