From ce209e0300c92fbc9d94a19b561aa293112d4a37 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Tue, 24 Mar 2026 22:07:54 +0800 Subject: [PATCH] fix: ensure the status bar always has the directory length available --- yazi-plugin/preset/components/status.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yazi-plugin/preset/components/status.lua b/yazi-plugin/preset/components/status.lua index 347495f7..ba1a5070 100644 --- a/yazi-plugin/preset/components/status.lua +++ b/yazi-plugin/preset/components/status.lua @@ -7,7 +7,7 @@ Status = { _inc = 1000, _left = { { "mode", id = 1, order = 1000 }, - { "size", id = 2, order = 2000 }, + { "length", id = 2, order = 2000 }, { "name", id = 3, order = 3000 }, }, _right = { @@ -47,9 +47,9 @@ function Status:mode() } end -function Status:size() +function Status:length() local h = self._current.hovered - local size = h and (h:size() or h.cha.len) or 0 + local size = h and h.cha.len or 0 local style = self:style() return ui.Line {