refactor: add dropdown_keybinds configuration option

This commit is contained in:
CJ van den Berg 2025-12-23 21:45:06 +01:00
parent d59dc65e6b
commit c4301c40d9
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
3 changed files with 24 additions and 2 deletions

View file

@ -93,7 +93,10 @@ pub fn Create(options: type) type {
.query = .empty,
.view_rows = get_view_rows(tui.screen()),
.entries = .empty,
.mode = try keybind.mode("overlay/dropdown", allocator, .{
.mode = try keybind.mode(switch (tui.config().dropdown_keybinds) {
.standard => "overlay/dropdown",
.noninvasive => "overlay/dropdown-noninvasive",
}, allocator, .{
.insert_command = "overlay_insert_bytes",
}),
.placement = if (@hasDecl(options, "placement")) options.placement else .top_center,