Skip to content

Bug: Separators only look back one widget when determining what to show, skipping no-render widgets #518

Closed

Description

@plttn

Widgets that arbitrarily may or may not render content (such as Git status) when used in a layout like so:

(git branch) (Separator | ) (Git changes) (Separator [Space]) (Git Status) (Separator |) (Git root) 
⎇ main | (+42,-10) +* | my-repo

Results in a situation where if there is no git status, the printed line will instead be:

⎇ main | (+0,-0) my-repo

Claude Suggested Fix

The fix that avoids reintroducing #344's orphan-separator bug: instead of stopping at the first preceding non-separator widget regardless of content, keep walking back through empty widgets, but treat an actual separator (not flex-separator) as a hard stop — because that earlier separator already owns the boundary to whatever's beyond it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions