Skip to content

Commit

Permalink
fix(windows): normalize paths before edit (closes #1082)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibhagwan committed Mar 12, 2024
1 parent 1065545 commit 963749b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/fzf-lua/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ M.vimcmd_file = function(vimcmd, selected, opts, pcall_vimcmd)
-- force full paths when `autochdir=true` (#882)
relpath = fullpath
end
local cmd = vimcmd .. " " .. vim.fn.fnameescape(relpath)
-- we normalize the path or Windows will fail with directories starting
-- with special characters, for example "C:\app\(web)" will be traslated
-- by neovim to "c:\app(web)" (#1082)
local cmd = vimcmd .. " " .. vim.fn.fnameescape(path.normalize(relpath))
if pcall_vimcmd then
pcall(vim.cmd, cmd)
else
Expand Down

0 comments on commit 963749b

Please sign in to comment.