fix: escape filename before opening it
This commit is contained in:
@@ -210,7 +210,7 @@ function M.open_file(mode, filename)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if type(ecmd) == 'string' then
|
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
|
else
|
||||||
ecmd()
|
ecmd()
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user