Skip to content

Tighten footer keybind packing slack #26

Description

@Antoinegtir

Scope

The footer keybind packing in crates/fl-tui/src/render.rs (pack_footer_binds) computes available width using unicode-width style logic, but for plain ASCII single-character keybinds it sometimes leaves >2 chars of trailing whitespace before truncating — meaning an extra binding could have fit.

What to do

  • Add a test (snapshot or unit) that checks: at width N where exactly K bindings fit with the current separator, no binding is dropped.
  • Tighten the packing loop so the trailing slack is at most one separator wide.

Where

crates/fl-tui/src/render.rs — search for pack_footer_binds and FOOTER_BINDS.

Acceptance

  • New test covers the "almost-fits" case.
  • Manual check at terminal widths 60, 80, 100, 140 shows no wasted slack on the right edge.

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

    good first issueGood for newcomersresponsiveTerminal resize, narrow-width layoutstuiInline dashboard, widgets, rendering

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions