fix(lsp): floating popup should take offset_x into account when positioning (#15297)

This commit is contained in:
Hans Pinckaers
2021-08-09 23:56:58 +02:00
committed by GitHub
parent 33b4513b89
commit 1a10acb997

View File

@@ -973,7 +973,7 @@ function M.make_floating_popup_options(width, height, opts)
row = -get_border_size(opts).height
end
if vim.fn.wincol() + width <= api.nvim_get_option('columns') then
if vim.fn.wincol() + width + (opts.offset_x or 0) <= api.nvim_get_option('columns') then
anchor = anchor..'W'
col = 0
else