diff options
author | Hans Pinckaers <hans.pinckaers@gmail.com> | 2021-08-09 23:56:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-09 23:56:58 +0200 |
commit | 1a10acb997d2c454bef2c787faecde429c0c977b (patch) | |
tree | 1c54441a78a8f75a2a8e09ee284f887df2168ce6 /runtime/lua/vim/lsp/util.lua | |
parent | 33b4513b89949382a3d2f780637f67066721a935 (diff) | |
download | rneovim-1a10acb997d2c454bef2c787faecde429c0c977b.tar.gz rneovim-1a10acb997d2c454bef2c787faecde429c0c977b.tar.bz2 rneovim-1a10acb997d2c454bef2c787faecde429c0c977b.zip |
fix(lsp): floating popup should take offset_x into account when positioning (#15297)
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 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 |