Skip to content

Commit

Permalink
fix(complete_path): relative parent with "../" (#941)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibhagwan committed Dec 1, 2023
1 parent 077221e commit a1a2d0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/fzf-lua/complete.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ local function find_toplevel_cwd(maybe_cwd, postfix, orig_cwd)
if vim.fn.isdirectory(vim.fn.expand(maybe_cwd)) == 1 then
local disp_cwd, cwd = maybe_cwd, vim.fn.expand(maybe_cwd)
-- returned cwd must be full path
if cwd:sub(1, 1) == "." then
if cwd:sub(1, 1) == "." and cwd:sub(2, 2) == path.separator() then
cwd = vim.loop.cwd() .. (#cwd > 1 and cwd:sub(2) or "")
-- inject "./" only if original path started with it
-- otherwise ignore the "." retval from fnamemodify
Expand Down

0 comments on commit a1a2d0f

Please sign in to comment.