diff options
author | Marco Hinz <mh.codebro@gmail.com> | 2021-04-12 19:54:54 +0200 |
---|---|---|
committer | Marco Hinz <mh.codebro@gmail.com> | 2021-04-12 19:54:54 +0200 |
commit | 383182516747153d6e3c9ff3a7e6a19262e42c93 (patch) | |
tree | 4d2d7d2321f3b3f2376a54f8688f0ec82d44cf0c /runtime/lua/vim/lsp/util.lua | |
parent | a215adabc107e16525cc4a302d46c412a6dff148 (diff) | |
download | rneovim-383182516747153d6e3c9ff3a7e6a19262e42c93.tar.gz rneovim-383182516747153d6e3c9ff3a7e6a19262e42c93.tar.bz2 rneovim-383182516747153d6e3c9ff3a7e6a19262e42c93.zip |
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.
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
-rw-r--r-- | runtime/lua/vim/lsp/util.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index d0d379054d..325dc044be 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/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 |