Skip to content

Commit

Permalink
fix: uri's with column value of 0 (closes #1204)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibhagwan committed May 20, 2024
1 parent a6cda10 commit 8c15b66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/fzf-lua/path.lua
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ end

function M.entry_to_location(entry, opts)
local uri, line, col = entry:match("^(.*://.*):(%d+):(%d+):")
line = line and tonumber(line) or 1
col = col and tonumber(col) or 1
line = line and tonumber(line) > 0 and tonumber(line) or 1
col = col and tonumber(col) > 0 and tonumber(col) or 1
if opts.path_shorten and uri:match("file://") then
uri = "file://" .. M.lengthen(uri:sub(8))
end
Expand Down

0 comments on commit 8c15b66

Please sign in to comment.