Skip to content

Commit fd6588e

Browse files
phanenibhagwan
authored andcommitted
fix(win): consider border width
#2121 (comment)
1 parent 7af7336 commit fd6588e

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

lua/fzf-lua/win.lua

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -468,10 +468,9 @@ function FzfWin:normalize_winopts(fullscreen)
468468
}
469469

470470
-- #2121 we can suppress cmdline area when zindex >= 200
471-
local suppress_ch = fullscreen and winopts.zindex >= 200
472-
local max_width = suppress_ch and vim.o.columns or vim.o.columns - 2
473-
local max_height = suppress_ch and vim.o.lines or
474-
vim.o.lines - vim.o.cmdheight - 2
471+
local ch = fullscreen and winopts.zindex >= 200 and 0 or vim.o.cmdheight
472+
local max_width = vim.o.columns - 2
473+
local max_height = vim.o.lines - ch - 2
475474
winopts.width = math.min(max_width, winopts.width)
476475
winopts.height = math.min(max_height, winopts.height)
477476
if winopts.height <= 1 then

0 commit comments

Comments
 (0)