Skip to content

Commit 5b2dd41

Browse files
authored
fix: ensure the status bar always has the directory length available (#3810)
1 parent e2fae15 commit 5b2dd41

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

yazi-plugin/preset/components/status.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Status = {
77
_inc = 1000,
88
_left = {
99
{ "mode", id = 1, order = 1000 },
10-
{ "size", id = 2, order = 2000 },
10+
{ "length", id = 2, order = 2000 },
1111
{ "name", id = 3, order = 3000 },
1212
},
1313
_right = {
@@ -47,9 +47,9 @@ function Status:mode()
4747
}
4848
end
4949

50-
function Status:size()
50+
function Status:length()
5151
local h = self._current.hovered
52-
local size = h and (h:size() or h.cha.len) or 0
52+
local size = h and h.cha.len or 0
5353

5454
local style = self:style()
5555
return ui.Line {

0 commit comments

Comments
 (0)