diff options
author | Ashkan Kiani <ashkan.k.kiani@gmail.com> | 2019-11-20 11:34:10 -0800 |
---|---|---|
committer | Ashkan Kiani <ashkan.k.kiani@gmail.com> | 2019-11-20 11:34:10 -0800 |
commit | 3ae9b3781e0b66f5874971665b38314d61668627 (patch) | |
tree | 32d9b02ef70b8bfbab6135e5ef34453d60c51e3b /runtime/lua/vim/lsp/util.lua | |
parent | 69a0712a9c2bae0969f7a84e5ec321ce6120982b (diff) | |
download | rneovim-3ae9b3781e0b66f5874971665b38314d61668627.tar.gz rneovim-3ae9b3781e0b66f5874971665b38314d61668627.tar.bz2 rneovim-3ae9b3781e0b66f5874971665b38314d61668627.zip |
Bugfix for floating_preview
Don't modify your inputs.
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
-rw-r--r-- | runtime/lua/vim/lsp/util.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index f96e0f01a8..707e2d0d3b 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -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 |