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
This commit is contained in:
zeertzjq
2021-10-03 08:36:24 +08:00
committed by GitHub
parent c5e8c39102
commit b3e815094b
5 changed files with 295 additions and 83 deletions

View File

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