mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
lsp: Make open_floating_preview buffers ephemeral (#13437)
Fixes #13429.
This commit is contained in:
@@ -957,6 +957,7 @@ function M.open_floating_preview(contents, filetype, opts)
|
||||
end
|
||||
api.nvim_buf_set_lines(floating_bufnr, 0, -1, true, contents)
|
||||
api.nvim_buf_set_option(floating_bufnr, 'modifiable', false)
|
||||
api.nvim_buf_set_option(floating_bufnr, 'bufhidden', 'wipe')
|
||||
M.close_preview_autocmd({"CursorMoved", "CursorMovedI", "BufHidden", "BufLeave"}, floating_winnr)
|
||||
return floating_bufnr, floating_winnr
|
||||
end
|
||||
|
Reference in New Issue
Block a user