refactor(ui): simplify picker keybind setup

This commit is contained in:
ayn2op 2026-09-04 16:20:26 -04:00
parent 358ccd546d
commit b7ddfdc050

View file

@ -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,
})
}