From 517619af126f25f3da096ff156ce46b561b54be3 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Tue, 30 Dec 2025 07:58:34 +0800 Subject: [PATCH] chore: bump Yazi version to 25.12.29 --- chmod.yazi/main.lua | 3 +-- git.yazi/main.lua | 17 +++-------------- mactag.yazi/main.lua | 10 ++-------- mount.yazi/main.lua | 23 ++++------------------- smart-filter.yazi/main.lua | 3 +-- sudo-demo.yazi/main.lua | 4 ++-- 6 files changed, 13 insertions(+), 47 deletions(-) diff --git a/chmod.yazi/main.lua b/chmod.yazi/main.lua index f0476e1..a4dde67 100644 --- a/chmod.yazi/main.lua +++ b/chmod.yazi/main.lua @@ -1,4 +1,4 @@ ---- @since 25.5.31 +--- @since 25.12.29 local selected_or_hovered = ya.sync(function() local tab, paths = cx.active, {} @@ -32,7 +32,6 @@ return { local value, event = ya.input { title = "Chmod:", pos = { "top-center", y = 3, w = 40 }, - position = { "top-center", y = 3, w = 40 }, -- TODO: remove } if event ~= 1 then return diff --git a/git.yazi/main.lua b/git.yazi/main.lua index 704b208..71c5429 100644 --- a/git.yazi/main.lua +++ b/git.yazi/main.lua @@ -125,12 +125,7 @@ local add = ya.sync(function(st, cwd, repo, changed) st.repos[repo][path] = code end end - -- TODO: remove this - if ui.render then - ui.render() - else - ya.render() - end + ui.render() end) ---@param cwd string @@ -142,12 +137,7 @@ local remove = ya.sync(function(st, cwd) return end - -- TODO: remove this - if ui.render then - ui.render() - else - ya.render() - end + ui.render() st.dirs[cwd] = nil if not st.repos[repo] then return @@ -189,8 +179,7 @@ local function setup(st, opts) } Linemode:children_add(function(self) - -- TODO: use `not self._file.in_current` instead - if self._file.in_current == false then + if not self._file.in_current then return "" end diff --git a/mactag.yazi/main.lua b/mactag.yazi/main.lua index c114c96..8607b0d 100644 --- a/mactag.yazi/main.lua +++ b/mactag.yazi/main.lua @@ -4,12 +4,7 @@ local update = ya.sync(function(st, tags) for path, tag in pairs(tags) do st.tags[path] = #tag > 0 and tag or nil end - -- TODO: remove this - if ui.render then - ui.render() - else - ya.render() - end + ui.render() end) local selected_or_hovered = ya.sync(function() @@ -32,8 +27,7 @@ local function setup(st, opts) local url = tostring(self._file.url) local spans = {} for _, tag in ipairs(st.tags[url] or {}) do - -- TODO: use `not self._file.in_current` instead - if self._file.in_current == false then + if not self._file.in_current then elseif self._file.is_hovered then spans[#spans + 1] = ui.Span(" ●"):bg(st.colors[tag] or "reset") else diff --git a/mount.yazi/main.lua b/mount.yazi/main.lua index b320417..266d6c9 100644 --- a/mount.yazi/main.lua +++ b/mount.yazi/main.lua @@ -1,4 +1,4 @@ ---- @since 25.5.31 +--- @since 25.12.29 local toggle_ui = ya.sync(function(self) if self.children then @@ -7,12 +7,7 @@ local toggle_ui = ya.sync(function(self) else self.children = Modal:children_add(self, 10) end - -- TODO: remove this - if ui.render then - ui.render() - else - ya.render() - end + ui.render() end) local subscribe = ya.sync(function(self) @@ -23,12 +18,7 @@ end) local update_partitions = ya.sync(function(self, partitions) self.partitions = partitions self.cursor = math.max(0, math.min(self.cursor or 0, #self.partitions - 1)) - -- TODO: remove this - if ui.render then - ui.render() - else - ya.render() - end + ui.render() end) local active_partition = ya.sync(function(self) return self.partitions[self.cursor + 1] end) @@ -39,12 +29,7 @@ local update_cursor = ya.sync(function(self, cursor) else self.cursor = ya.clamp(0, self.cursor + cursor, #self.partitions - 1) end - -- TODO: remove this - if ui.render then - ui.render() - else - ya.render() - end + ui.render() end) local M = { diff --git a/smart-filter.yazi/main.lua b/smart-filter.yazi/main.lua index 146e265..2d1c3cd 100644 --- a/smart-filter.yazi/main.lua +++ b/smart-filter.yazi/main.lua @@ -1,4 +1,4 @@ ---- @since 25.5.31 +--- @since 25.12.29 local hovered = ya.sync(function() local h = cx.active.current.hovered @@ -17,7 +17,6 @@ local function prompt() return ya.input { title = "Smart filter:", pos = { "center", w = 50 }, - position = { "center", w = 50 }, -- TODO: remove realtime = true, debounce = 0.1, } diff --git a/sudo-demo.yazi/main.lua b/sudo-demo.yazi/main.lua index 599afe4..d1a2297 100644 --- a/sudo-demo.yazi/main.lua +++ b/sudo-demo.yazi/main.lua @@ -1,4 +1,4 @@ ---- @since 25.5.31 +--- @since 25.12.29 --- Verify if `sudo` is already authenticated --- @return boolean @@ -21,7 +21,7 @@ local function run_with_sudo(program, args) return cmd:output() end - local permit = ui.hide and ui.hide() or ya.hide() -- TODO: remove this + local permit = ui.hide() print(string.format("Sudo password required to run: `%s %s`", program, table.concat(args))) local output = cmd:output() permit:drop()