Browse Source

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.
pull/14324/head
Marco Hinz 4 weeks ago
parent
commit
3831825167
No known key found for this signature in database GPG Key ID: 1C980A1B657B4A4F
  1. 2
      runtime/lua/vim/lsp/util.lua

2
runtime/lua/vim/lsp/util.lua

@ -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

Loading…
Cancel
Save