From 1a10acb997d2c454bef2c787faecde429c0c977b Mon Sep 17 00:00:00 2001 From: Hans Pinckaers Date: Mon, 9 Aug 2021 23:56:58 +0200 Subject: fix(lsp): floating popup should take offset_x into account when positioning (#15297) --- runtime/lua/vim/lsp/util.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index 6e36635dbd..f969d4a8d9 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -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 -- cgit