Skip to content

fix(picker): restore picker_width=false opt-out in session picker#410

Merged
sudo-tee merged 1 commit into
sudo-tee:mainfrom
hermandavid:fix/picker-width-false-opt-out
Jun 8, 2026
Merged

fix(picker): restore picker_width=false opt-out in session picker#410
sudo-tee merged 1 commit into
sudo-tee:mainfrom
hermandavid:fix/picker-width-false-opt-out

Conversation

@hermandavid

Copy link
Copy Markdown
Contributor

Issue

Setting picker_width = false to opt out of width overrides and let the picker backend use its own defaults no longer works for the session picker. Commit b977136 (#403) introduced config.ui.picker_width or 100 in @session_picker.lua, which silently converts false into 100 before base_picker.pick() ever sees it. The falsenil opt-out conversion in M.pick() (added in #400) is never reached.

Solution

Remove the or 100 fallback so picker_width is passed through as-is. M.pick() already handles all three cases: a number is used directly, nil falls back to config.ui.picker_width, and false is converted to nil to let the backend decide its own window size.

The cross-project session list (sudo-tee#403) added an `or 100` fallback when
passing picker_width to base_picker.pick(). This silently converts
`picker_width = false` into 100, bypassing the opt-out path that lets
the picker backend use its own default window size.
@sudo-tee

sudo-tee commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Thanks for the fix

@sudo-tee sudo-tee merged commit 543b732 into sudo-tee:main Jun 8, 2026
5 checks passed
@hermandavid hermandavid deleted the fix/picker-width-false-opt-out branch June 9, 2026 12:45
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