Skip to content

fix(picker): format fzf preview entries to list width#402

Merged
sudo-tee merged 1 commit into
sudo-tee:mainfrom
hermandavid:fix/fzf-preview-format-width
Jun 5, 2026
Merged

fix(picker): format fzf preview entries to list width#402
sudo-tee merged 1 commit into
sudo-tee:mainfrom
hermandavid:fix/fzf-preview-format-width

Conversation

@hermandavid
Copy link
Copy Markdown
Contributor

Issue

PR #399 fixed the fzf-lua session picker preview gutter, but the width handling for preview mode still used the full picker width for session rows. In practice, that pushed the datetime column off the visible list pane and truncated session rows down to the title and ellipsis.

Solution

Make preview-aware width handling happen where picker item width is actually determined. The list width is now computed before the picker callback is wrapped, so fzf preview entries use the visible list pane width while the picker window itself still uses the full width.

Changes

  • Move the fzf preview width adjustment into base_picker.pick(), where item
    width is passed into the picker callback.
  • Remove the ineffective @opts.width mutation from fzf_ui(), which happened
    too late to affect the rendered session rows.
  • Add a regression test that verifies preview-mode entries use the list-pane
    width while fzf still receives the full window width.

@hermandavid
Copy link
Copy Markdown
Contributor Author

This is a fix for a bug introduced in #399

@sudo-tee sudo-tee merged commit 0a9d257 into sudo-tee:main Jun 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants