mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
fix(diagnostic): allow floats to be focusable (#16093)
Setting focus_id allows the float to be focused by calling the function a second time (a feature of open_floating_preview).
This commit is contained in:
parent
a2994c82e3
commit
427bac6877
@ -1207,6 +1207,10 @@ function M.open_float(bufnr, opts)
|
||||
end
|
||||
end
|
||||
|
||||
-- Used by open_floating_preview to allow the float to be focused
|
||||
if not opts.focus_id then
|
||||
opts.focus_id = scope
|
||||
end
|
||||
local float_bufnr, winnr = require('vim.lsp.util').open_floating_preview(lines, 'plaintext', opts)
|
||||
for i, hi in ipairs(highlights) do
|
||||
local prefixlen, hiname = unpack(hi)
|
||||
|
Loading…
Reference in New Issue
Block a user