fix(hover): clamp to max_height when computing height
This commit is contained in:
@@ -73,8 +73,9 @@ end
|
|||||||
|
|
||||||
---@return integer
|
---@return integer
|
||||||
function Window:compute_height()
|
function Window:compute_height()
|
||||||
local text_height = vim.api.nvim_win_text_height(self.winid, {}).all
|
return vim.api.nvim_win_text_height(self.winid, {
|
||||||
return math.min(self.max_height or text_height, text_height)
|
max_height = self.max_height,
|
||||||
|
}).all
|
||||||
end
|
end
|
||||||
|
|
||||||
---@param callback fun()
|
---@param callback fun()
|
||||||
|
|||||||
Reference in New Issue
Block a user