diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..6f14c95 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,18 @@ +--- +release type: patch +--- + +Fix inline menu option wrapping by using spaces instead of tabs. + +When using inline menus (e.g., `app.confirm()`), options like "Yes" and "No" were wrapping to separate lines due to tab character separators expanding unpredictably in fixed-width table columns. This release replaces tab separators with two spaces for consistent, predictable spacing. + +**Before:** +``` +● Yes +○ No +``` + +**After:** +``` +● Yes ○ No +``` diff --git a/src/rich_toolkit/styles/base.py b/src/rich_toolkit/styles/base.py index 8670016..1c690a6 100644 --- a/src/rich_toolkit/styles/base.py +++ b/src/rich_toolkit/styles/base.py @@ -299,7 +299,7 @@ def render_menu( selected_prefix = Text(element.current_selection_char + " ") not_selected_prefix = Text(element.selection_char + " ") - separator = Text("\t" if element.inline else "\n") + separator = Text(" " if element.inline else "\n") if done: result_content = Text()