From 22129c714fcb0acd2cebba77980e6461a2c69d6b Mon Sep 17 00:00:00 2001 From: William Boman Date: Fri, 2 Dec 2022 19:16:05 +0100 Subject: [PATCH] feat(ui): increase window height (#719) --- lua/mason-core/ui/display.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/mason-core/ui/display.lua b/lua/mason-core/ui/display.lua index f59d09528..b98b37ee8 100644 --- a/lua/mason-core/ui/display.lua +++ b/lua/mason-core/ui/display.lua @@ -170,15 +170,15 @@ M._render_node = render_node ---@param opts WindowOpts ---@param sizes_only boolean Whether to only return properties that control the window size. local function create_popup_window_opts(opts, sizes_only) - local win_height = vim.o.lines - vim.o.cmdheight - 2 -- Add margin for status and buffer line - local win_width = vim.o.columns - local height = math.floor(win_height * 0.9) - local width = math.floor(win_width * 0.8) + local columns = vim.o.columns + local top_offset = 1 + local height = vim.o.lines - vim.o.cmdheight - top_offset + local width = math.floor(columns * 0.8) local popup_layout = { height = height, width = width, - row = math.floor((win_height - height) / 2), - col = math.floor((win_width - width) / 2), + row = top_offset, + col = math.floor((columns - width) / 2), relative = "editor", style = "minimal", zindex = 45,