mirror of
https://github.com/zoriya/jj.nvim.git
synced 2026-08-15 23:53:18 +00:00
fix(diff): correctly relativize paths for diffing current buffer (#108)
This commit is contained in:
@@ -56,7 +56,7 @@ diff.register_backend("diffview", {
|
||||
end
|
||||
|
||||
local raw_path = opts.path or jj_path or "%"
|
||||
local path, err = utils.normalize_repo_path(raw_path)
|
||||
local path, err = utils.normalize_relative_path(raw_path)
|
||||
if not path then
|
||||
utils.notify(err or "Could not resolve file path for Diffview", vim.log.levels.ERROR)
|
||||
return
|
||||
|
||||
@@ -21,7 +21,7 @@ local function open_revision(rev, path)
|
||||
end
|
||||
local change_id = ids[1]
|
||||
|
||||
local rel_path, err = utils.normalize_repo_path(path)
|
||||
local rel_path, err = utils.normalize_relative_path(path)
|
||||
if not rel_path then
|
||||
utils.notify(err or "Could not resolve path", vim.log.levels.ERROR)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user