diff options
| author | TJ DeVries <devries.timothyj@gmail.com> | 2020-10-08 12:53:42 -0400 |
|---|---|---|
| committer | TJ DeVries <devries.timothyj@gmail.com> | 2020-10-08 12:53:42 -0400 |
| commit | 9d894f8229cdece3b5ab8b2d5200f7d2d39ed5e8 (patch) | |
| tree | 8fa3fd7181eec929f89397d8d5810d4107110f79 /lua/telescope/pickers.lua | |
| parent | 8736ea5f6a47c87c206b21e64bdd2eaed57e84bf (diff) | |
fix: Respect cmdheight and laststatus
Diffstat (limited to 'lua/telescope/pickers.lua')
| -rw-r--r-- | lua/telescope/pickers.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua index 6f16ed6..eec61a0 100644 --- a/lua/telescope/pickers.lua +++ b/lua/telescope/pickers.lua @@ -280,7 +280,12 @@ function Picker:find() -- 1. Prompt window -- 2. Options window -- 3. Preview window - local popup_opts = self:get_window_options(vim.o.columns, vim.o.lines) + local line_count = vim.o.lines - vim.o.cmdheight + if vim.o.laststatus ~= 0 then + line_count = line_count - 1 + end + + local popup_opts = self:get_window_options(vim.o.columns, line_count) -- `popup.nvim` massaging so people don't have to remember minheight shenanigans popup_opts.results.minheight = popup_opts.results.height |
