fix: escape filename used in drop commands (#2339)

This commit is contained in:
Ryan Blonna
2023-01-22 19:19:49 +11:00
committed by GitHub
parent 83eb2f9756
commit 4b4db1ff7d

View File

@@ -83,7 +83,7 @@ do
if command ~= "drop" and command ~= "tab drop" then if command ~= "drop" and command ~= "tab drop" then
vim.cmd(string.format("%s %d", command, bufnr)) vim.cmd(string.format("%s %d", command, bufnr))
else else
vim.cmd(string.format("%s %s", command, vim.api.nvim_buf_get_name(bufnr))) vim.cmd(string.format("%s %s", command, vim.fn.fnameescape(vim.api.nvim_buf_get_name(bufnr))))
end end
end end
end end