fix(nvim): guarantee abook pane is at least 20 lines tall

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
Amir Alexander Abdelbaki 2026-05-26 13:40:45 +02:00
parent c2514b6fb5
commit 211763d2c8
1 changed files with 2 additions and 2 deletions

View File

@ -250,8 +250,8 @@ local function toggle_pim()
local W = vim.o.columns local W = vim.o.columns
local right_w = math.max(80, math.floor(W * 0.45)) local right_w = math.max(80, math.floor(W * 0.45))
local left_w = math.max(1, W - right_w) local left_w = math.max(1, W - right_w)
local top_h = math.max(1, math.floor(H / 2)) local top_h = math.max(20, math.floor(H / 2))
local bot_h = math.max(1, H - top_h) local bot_h = math.max(1, H - top_h)
local w1 = _pim_float(0, 0, H, left_w) local w1 = _pim_float(0, 0, H, left_w)
local ok, err = pcall(vim.cmd, "terminal alot") local ok, err = pcall(vim.cmd, "terminal alot")