Skip to content

Commit b285257

Browse files
elianivakyazdani42
authored andcommitted
fix: escape filename before opening it
1 parent 91bd2b5 commit b285257

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/lib/lib.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ function M.open_file(mode, filename)
210210
end
211211

212212
if type(ecmd) == 'string' then
213-
api.nvim_command(string.format('%s %s', ecmd, filename))
213+
api.nvim_command(string.format('%s %s', ecmd, vim.fn.fnameescape(filename)))
214214
else
215215
ecmd()
216216
end

0 commit comments

Comments
 (0)