mirror of
https://github.com/neovim/neovim.git
synced 2026-07-13 21:00:42 +00:00
fix(lsp): calc correct screen_width when opts.relative == 'editor' (#39977)
(cherry picked from commit a9d7cbd722)
This commit is contained in:
committed by
github-actions[bot]
parent
d1cf3ab4c3
commit
445fe8a6b7
@@ -1544,7 +1544,7 @@ function M._make_floating_popup_size(contents, opts)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local _, border_width = get_border_size(opts)
|
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)
|
width = math.min(width, screen_width)
|
||||||
|
|
||||||
-- make sure borders are always inside the screen
|
-- make sure borders are always inside the screen
|
||||||
|
|||||||
Reference in New Issue
Block a user