From b3e815094bad6c28b758bc7538bf1b13936660fc Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 3 Oct 2021 08:36:24 +0800 Subject: fix(float)!: always anchor to corner of window including border #15832 N, W, S, E are all inclusive, i.e., always anchor to the exact corner of the window (including border). This line may also need change in this case (change 0 to -1): This is most consistent and easiest to reason about, especially with GUIs whose border do not need to have width/height of 1/1 in cell units. Fix #15789 --- runtime/lua/vim/lsp/util.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/lua') diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index e95f170427..09d0a8e62a 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -975,7 +975,7 @@ function M.make_floating_popup_options(width, height, opts) else anchor = anchor..'S' height = math.min(lines_above, height) - row = -get_border_size(opts).height + row = 0 end if vim.fn.wincol() + width + (opts.offset_x or 0) <= api.nvim_get_option('columns') then -- cgit