From d0c1f7e2d86e4506a429edff523a790c59e75a1a Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Thu, 16 Apr 2026 02:13:15 +0200 Subject: [PATCH] fix(hover): clamp to max_height when computing height --- lua/dap/hover/window.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/dap/hover/window.lua b/lua/dap/hover/window.lua index e1fda5f..2e802a6 100644 --- a/lua/dap/hover/window.lua +++ b/lua/dap/hover/window.lua @@ -73,8 +73,9 @@ end ---@return integer function Window:compute_height() - local text_height = vim.api.nvim_win_text_height(self.winid, {}).all - return math.min(self.max_height or text_height, text_height) + return vim.api.nvim_win_text_height(self.winid, { + max_height = self.max_height, + }).all end ---@param callback fun()