From 9d894f8229cdece3b5ab8b2d5200f7d2d39ed5e8 Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Thu, 8 Oct 2020 12:53:42 -0400 Subject: fix: Respect cmdheight and laststatus --- lua/telescope/pickers.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lua/telescope/pickers.lua') 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 -- cgit v1.2.3