feat: make git.yazi work in the search view (compatible with vcs-files.yazi)
This commit is contained in:
@@ -158,7 +158,7 @@ local function setup(st, opts)
|
|||||||
|
|
||||||
Linemode:children_add(function(self)
|
Linemode:children_add(function(self)
|
||||||
local url = self._file.url
|
local url = self._file.url
|
||||||
local repo = st.dirs[tostring(url:parent())]
|
local repo = st.dirs[tostring(url.base or url:parent())] -- TODO: remove this
|
||||||
local code
|
local code
|
||||||
if repo then
|
if repo then
|
||||||
code = repo == CODES.excluded and CODES.ignored or st.repos[repo][tostring(url):sub(#repo + 2)]
|
code = repo == CODES.excluded and CODES.ignored or st.repos[repo][tostring(url):sub(#repo + 2)]
|
||||||
@@ -175,7 +175,7 @@ local function setup(st, opts)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function fetch(_, job)
|
local function fetch(_, job)
|
||||||
local cwd = job.files[1].url:parent()
|
local cwd = job.files[1].url.base or job.files[1].url:parent() -- TODO: remove this
|
||||||
local repo = root(cwd)
|
local repo = root(cwd)
|
||||||
if not repo then
|
if not repo then
|
||||||
remove(tostring(cwd))
|
remove(tostring(cwd))
|
||||||
|
|||||||
Reference in New Issue
Block a user