fix(picker.select): default height shows just the items. See #902

This commit is contained in:
Folke Lemaitre 2025-02-03 20:51:04 +01:00
parent 97570d23ac
commit c667622fb7
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 2 additions and 2 deletions

View file

@ -148,7 +148,7 @@ M.select = {
width = 0.5, width = 0.5,
min_width = 80, min_width = 80,
height = 0.4, height = 0.4,
min_height = 10, min_height = 3,
box = "vertical", box = "vertical",
border = "rounded", border = "rounded",
title = "{title}", title = "{title}",

View file

@ -34,7 +34,7 @@ function M.select(items, opts, on_choice)
layout = { layout = {
preview = false, preview = false,
layout = { layout = {
height = math.floor(math.min(vim.o.lines * 0.8 - 10, #items + 2) + 0.5) + 10, height = math.floor(math.min(vim.o.lines * 0.8 - 10, #items + 2) + 0.5),
}, },
}, },
actions = { actions = {