mirror of
https://github.com/neovim/neovim.git
synced 2026-07-19 23:51:38 +00:00
docs: misc #39511
This commit is contained in:
@@ -923,8 +923,8 @@ function M.make_floating_popup_options(width, height, opts)
|
||||
|
||||
local anchor = ''
|
||||
|
||||
local lines_above --- @type integer
|
||||
local lines_below --- @type integer
|
||||
local lines_above = vim.fn.winline() - 1
|
||||
local lines_below = vim.fn.winheight(0) - lines_above
|
||||
if opts.relative == 'mouse' then
|
||||
lines_above = vim.fn.getmousepos().line - 1
|
||||
lines_below = vim.fn.winheight(0) - lines_above
|
||||
@@ -932,9 +932,6 @@ function M.make_floating_popup_options(width, height, opts)
|
||||
-- No cursor to anchor against; treat the whole editor as space below.
|
||||
lines_above = 0
|
||||
lines_below = vim.o.lines
|
||||
else
|
||||
lines_above = vim.fn.winline() - 1
|
||||
lines_below = vim.fn.winheight(0) - lines_above
|
||||
end
|
||||
|
||||
local anchor_bias = opts.anchor_bias or 'auto'
|
||||
@@ -962,13 +959,11 @@ function M.make_floating_popup_options(width, height, opts)
|
||||
row = 0
|
||||
end
|
||||
|
||||
local wincol --- @type integer
|
||||
local wincol = vim.fn.wincol()
|
||||
if opts.relative == 'mouse' then
|
||||
wincol = vim.fn.getmousepos().column
|
||||
elseif opts.relative == 'editor' then
|
||||
wincol = 0
|
||||
else
|
||||
wincol = vim.fn.wincol()
|
||||
end
|
||||
|
||||
if wincol + width + (opts.offset_x or 0) <= vim.o.columns then
|
||||
|
||||
Reference in New Issue
Block a user