Skip to content

Enabling Powerline mode permanently deletes manual separators #531

Description

@hangie

Enabling Powerline mode removes every manual separator widget from all lines, and disabling it doesn't bring them back — so trying Powerline out and changing your mind loses that part of your config. There is a confirm dialog, but it says "Do you want to continue?" without indicating the change is permanent, and the only undo is quitting the TUI without saving, which discards everything else too.

Repro

  1. Add one or more separators to a line
  2. Powerline Setup → (t) to enable → confirm
  3. (t) again to disable

The separators are gone.

Where

  • src/utils/powerline-settings.ts:15 rebuilds each line without type === 'separator'
  • src/tui/components/PowerlineSetup.tsx:198 only sets enabled: false on the way back

Why it may not be needed

src/utils/renderer.ts:145 already filters out both separator and flex-separator before Powerline rendering, so those widgets never reach the output regardless of whether they're still in the config.

And the enable-time filter only removes separator — so flex separators already survive Powerline mode and are simply ignored, which is exactly the non-destructive handling manual separators are denied.

Options

A — Stop deleting (my preference). Leave separators in place, inert, exactly as flex separators already are; optionally dim them in the widget editor with an (inactive) tag. Powerline becomes a toggle you can back out of.

Consequence to weigh: separators act as merge-run boundaries under Powerline (hasNextRenderedWidgetBeforeSeparator), so a merge would no longer span one. They don't consume a theme colour slot, so no colours shift. That's arguably the correct reading of a user-placed separator, but it is a behaviour change.

B — Keep deleting, make it reversible. Stash the removed separators so disabling restores them. Preserves current rendering exactly; costs somewhere to keep the stashed items.

Happy to put up a PR for whichever you prefer.

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