mirror of
https://github.com/neovim/neovim.git
synced 2025-12-11 09:02:40 +00:00
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:
@@ -890,7 +890,7 @@ function M.make_floating_popup_options(width, height, opts)
|
|||||||
else
|
else
|
||||||
anchor = anchor..'S'
|
anchor = anchor..'S'
|
||||||
height = math.min(lines_above, height)
|
height = math.min(lines_above, height)
|
||||||
row = 0
|
row = -get_border_size(opts).height
|
||||||
end
|
end
|
||||||
|
|
||||||
if vim.fn.wincol() + width <= api.nvim_get_option('columns') then
|
if vim.fn.wincol() + width <= api.nvim_get_option('columns') then
|
||||||
|
|||||||
Reference in New Issue
Block a user