mirror of
https://github.com/neovim/neovim.git
synced 2026-05-26 06:48:27 +00:00
fix(lsp): calc correct screen_width when opts.relative == 'editor' (#39977)
This commit is contained in:
@@ -1367,7 +1367,7 @@ function M._make_floating_popup_size(contents, opts)
|
||||
end
|
||||
|
||||
local _, border_width = get_border_size(opts)
|
||||
local screen_width = api.nvim_win_get_width(0)
|
||||
local screen_width = opts.relative == 'editor' and vim.o.columns or api.nvim_win_get_width(0)
|
||||
width = math.min(width, screen_width)
|
||||
|
||||
-- make sure borders are always inside the screen
|
||||
|
||||
Reference in New Issue
Block a user