fix: escape filename for previewer and action (#456)

This commit is contained in:
elianiva
2021-01-23 19:35:29 +07:00
committed by GitHub
parent 223ec81774
commit 099910dcd9
2 changed files with 5 additions and 3 deletions

View File

@@ -120,7 +120,7 @@ function actions._goto_file_selection(prompt_bufnr, command)
vim.cmd(string.format(":tab sb %d", entry_bufnr))
end
else
filename = path.normalize(filename, vim.fn.getcwd())
filename = path.normalize(vim.fn.fnameescape(filename), vim.fn.getcwd())
local bufnr = vim.api.nvim_get_current_buf()
if filename ~= vim.api.nvim_buf_get_name(bufnr) then