From 9a095057d698aaaedc4dd23d638285bd3fd647e9 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Fri, 4 Apr 2025 19:33:04 +0800 Subject: [PATCH] fix: bump version to 25.4.4 --- git.yazi/main.lua | 16 ++++++++-------- mactag.yazi/main.lua | 4 ++-- mime-ext.yazi/main.lua | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/git.yazi/main.lua b/git.yazi/main.lua index b301f13..d8f365a 100644 --- a/git.yazi/main.lua +++ b/git.yazi/main.lua @@ -1,4 +1,4 @@ ---- @since 25.2.26 +--- @since 25.4.4 local WINDOWS = ya.target_family() == "windows" @@ -60,7 +60,7 @@ local function root(cwd) if cha and (cha.is_dir or is_worktree(next)) then return tostring(cwd) end - cwd = cwd:parent() + cwd = cwd.parent until not cwd end @@ -68,11 +68,11 @@ local function bubble_up(changed) local new, empty = {}, Url("") for path, code in pairs(changed) do if code ~= CODES.ignored then - local url = Url(path):parent() + local url = Url(path).parent while url and url ~= empty do local s = tostring(url) new[s] = (new[s] or CODES.unknown) > code and new[s] or code - url = url:parent() + url = url.parent end end end @@ -85,7 +85,7 @@ local function propagate_down(excluded, cwd, repo) if rel:starts_with(path) then -- If `cwd` is a subdirectory of an excluded directory, also mark it as `excluded` new[tostring(cwd)] = CODES.excluded - elseif cwd == repo:join(path):parent() then + elseif cwd == repo:join(path).parent then -- If `path` is a direct subdirectory of `cwd`, mark it as `ignored` new[path] = CODES.ignored else @@ -158,7 +158,7 @@ local function setup(st, opts) Linemode:children_add(function(self) local url = self._file.url - local repo = st.dirs[tostring(url.base or url:parent())] -- TODO: remove this + local repo = st.dirs[tostring(url.base)] local code if repo then code = repo == CODES.excluded and CODES.ignored or st.repos[repo][tostring(url):sub(#repo + 2)] @@ -166,7 +166,7 @@ local function setup(st, opts) if not code or signs[code] == "" then return "" - elseif self._file:is_hovered() then + elseif self._file.is_hovered then return ui.Line { " ", signs[code] } else return ui.Line { " ", ui.Span(signs[code]):style(styles[code]) } @@ -175,7 +175,7 @@ local function setup(st, opts) end local function fetch(_, job) - local cwd = job.files[1].url.base or job.files[1].url:parent() -- TODO: remove this + local cwd = job.files[1].url.base local repo = root(cwd) if not repo then remove(tostring(cwd)) diff --git a/mactag.yazi/main.lua b/mactag.yazi/main.lua index f1a87e0..5982e1f 100644 --- a/mactag.yazi/main.lua +++ b/mactag.yazi/main.lua @@ -1,4 +1,4 @@ ---- @since 25.2.26 +--- @since 25.4.4 local update = ya.sync(function(st, tags) for path, tag in pairs(tags) do @@ -27,7 +27,7 @@ local function setup(st, opts) local url = tostring(self._file.url) local spans = {} for _, tag in ipairs(st.tags[url] or {}) do - if self._file:is_hovered() then + if self._file.is_hovered then spans[#spans + 1] = ui.Span(" ●"):bg(st.colors[tag] or "reset") else spans[#spans + 1] = ui.Span(" ●"):fg(st.colors[tag] or "reset") diff --git a/mime-ext.yazi/main.lua b/mime-ext.yazi/main.lua index 7c82fcb..c3e0638 100644 --- a/mime-ext.yazi/main.lua +++ b/mime-ext.yazi/main.lua @@ -1,4 +1,4 @@ ---- @since 25.2.26 +--- @since 25.4.4 local FILES = { [".envrc"] = "text/plain", @@ -1081,8 +1081,8 @@ function M:fetch(job) if file.cha.len == 0 then mime = "inode/empty" else - mime = merged_files[(file.url:name() or ""):lower()] - mime = mime or merged_exts[(file.url:ext() or ""):lower()] + mime = merged_files[(file.url.name or ""):lower()] + mime = mime or merged_exts[(file.url.ext or ""):lower()] end if mime then