mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
Bugfix for floating_preview
Don't modify your inputs.
This commit is contained in:
@@ -262,6 +262,9 @@ function M.open_floating_preview(contents, filetype, opts)
|
||||
opts = { opts, 't', true };
|
||||
}
|
||||
|
||||
-- Don't modify our inputs.
|
||||
contents = vim.deepcopy(contents)
|
||||
|
||||
-- Trim empty lines from the end.
|
||||
for i = #contents, 1, -1 do
|
||||
if #contents[i] == 0 then
|
||||
|
||||
Reference in New Issue
Block a user