fix: escape filename before opening it

This commit is contained in:
elianiva 2021-01-22 14:31:23 +07:00 committed by Kiyan
parent 91bd2b53ba
commit b285257876

View File

@ -210,7 +210,7 @@ function M.open_file(mode, filename)
end
if type(ecmd) == 'string' then
api.nvim_command(string.format('%s %s', ecmd, filename))
api.nvim_command(string.format('%s %s', ecmd, vim.fn.fnameescape(filename)))
else
ecmd()
end