From b7ddfdc05089894a915f2b4b1235b0d6e23a07ea Mon Sep 17 00:00:00 2001 From: ayn2op Date: Fri, 4 Sep 2026 16:20:26 -0400 Subject: [PATCH] refactor(ui): simplify picker keybind setup --- internal/ui/util.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/internal/ui/util.go b/internal/ui/util.go index dffc118..6bcbe11 100644 --- a/internal/ui/util.go +++ b/internal/ui/util.go @@ -52,13 +52,16 @@ func ConfigurePicker(model *picker.Model, cfg *config.Config, title string) { SetTrackStyle(cfg.Theme.ScrollBar.TrackStyle.Style). SetThumbStyle(cfg.Theme.ScrollBar.ThumbStyle.Style). SetGlyphSet(cfg.Theme.ScrollBar.GlyphSet.GlyphSet)) + + kbs := cfg.Keybinds.Picker model.SetKeybinds(picker.Keybinds{ - Cancel: cfg.Keybinds.Picker.Cancel.Keybind, - SelectUp: cfg.Keybinds.Picker.SelectUp.Keybind, - SelectDown: cfg.Keybinds.Picker.SelectDown.Keybind, - SelectTop: cfg.Keybinds.Picker.SelectTop.Keybind, - SelectBottom: cfg.Keybinds.Picker.SelectBottom.Keybind, - Select: cfg.Keybinds.Picker.Select.Keybind, + Cancel: kbs.Cancel.Keybind, + Select: kbs.Select.Keybind, + + SelectUp: kbs.SelectUp.Keybind, + SelectDown: kbs.SelectDown.Keybind, + SelectTop: kbs.SelectTop.Keybind, + SelectBottom: kbs.SelectBottom.Keybind, }) }