lsp: correct float placement when using borders

Because borders add up to 2 to the height of a float, we need to subtract that
from the anchor position, when opening a float in the lower half of the window.
This commit is contained in:
Marco Hinz
2021-04-12 19:54:54 +02:00
parent a215adabc1
commit 3831825167

View File

@@ -890,7 +890,7 @@ function M.make_floating_popup_options(width, height, opts)
else
anchor = anchor..'S'
height = math.min(lines_above, height)
row = 0
row = -get_border_size(opts).height
end
if vim.fn.wincol() + width <= api.nvim_get_option('columns') then