Repository navigation
fix: default to full flex mode and make multi-line alignment independent per line - #349
Conversation
4f7a07b to
ec28376
Compare
|
@godlockin Can you explain the intent of this PR a little more clearly? The whole purpose of auto-alignment in powerline mode is to ensure every widget is vertically aligned with the widget above and/or below it. By calculating max width's on a per-line basis, this effectively prevents that functionality from working as intended. A better fix to exclude wide widgets from affecting everything else would be to allow a single widget to be manually flagged as excluded from the auto-align calculation, which would basically cause that widget and everything after it on the same line to be exempt from any changes to their default widths. |
|
Sorry replay late, I didn't get the notice of your comment. This change is aim to make the status' display dynamic adaption the width of terminal window When I change the width of terminal window (and of cuz split it .etc) the cc status may have some display issue like omitted a part, or even can't display while there is still some blank space |
…ent per line - Change default flexMode from 'full-minus-40' to 'full' so status line content is not unnecessarily truncated for new/default configurations - Refactor calculateMaxWidthsFromPreRendered to return number[][] instead of number[], giving each line its own independent column widths so that a wide widget on one line no longer forces the same column wider on other lines when autoAlign is enabled Co-Authored-By: Claude Sonnet 4 <[email protected]>
Co-Authored-By: Claude Sonnet 4 <[email protected]>
Co-Authored-By: Claude Sonnet 4 <[email protected]>
Co-Authored-By: Claude Opus 4.7 <[email protected]>
0345ef4 to
786d45f
Compare
…sync Upstream's calculateMaxWidthsFromPreRendered returned global column widths (number[]); ours returns per-line widths (number[][]). Adapt the new upstream test helper to index the first line, matching the pattern in renderer-powerline-theme.test.ts. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Retain the default flex mode change from #349 and update the import-preview test for the new default. Explicit flex mode settings and cross-line alignment remain unchanged.
Summary
Default flexMode changed from
full-minus-40tofull: New/default configurations were unnecessarily truncating status line content by subtracting 40 characters from terminal width. Changed tofull(subtracts only 6) so content is visible by default. Existing configs with an explicitflexModevalue are unaffected.Per-line independent column widths for autoAlign:
calculateMaxWidthsFromPreRenderedpreviously computed a single sharednumber[]of max column widths across all lines. This caused a wide widget on one line to force the same column wider on every other line. Changed return type tonumber[][]so each line gets its own independent column widths.Test plan
bun test)npx tsc --noEmit)renderer-ansi,renderer-flex-width,renderer-powerline-theme,renderer-separator-collapse) all pass🤖 Generated with Claude Code