mirror of
https://github.com/neovim/neovim.git
synced 2025-11-04 09:44:31 +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 };
|
opts = { opts, 't', true };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- Don't modify our inputs.
|
||||||
|
contents = vim.deepcopy(contents)
|
||||||
|
|
||||||
-- Trim empty lines from the end.
|
-- Trim empty lines from the end.
|
||||||
for i = #contents, 1, -1 do
|
for i = #contents, 1, -1 do
|
||||||
if #contents[i] == 0 then
|
if #contents[i] == 0 then
|
||||||
|
|||||||
Reference in New Issue
Block a user