mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix: ensure the status bar always has the directory length available (#3810)
This commit is contained in:
parent
e2fae151a5
commit
5b2dd41e64
1 changed files with 3 additions and 3 deletions
|
|
@ -7,7 +7,7 @@ Status = {
|
||||||
_inc = 1000,
|
_inc = 1000,
|
||||||
_left = {
|
_left = {
|
||||||
{ "mode", id = 1, order = 1000 },
|
{ "mode", id = 1, order = 1000 },
|
||||||
{ "size", id = 2, order = 2000 },
|
{ "length", id = 2, order = 2000 },
|
||||||
{ "name", id = 3, order = 3000 },
|
{ "name", id = 3, order = 3000 },
|
||||||
},
|
},
|
||||||
_right = {
|
_right = {
|
||||||
|
|
@ -47,9 +47,9 @@ function Status:mode()
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
function Status:size()
|
function Status:length()
|
||||||
local h = self._current.hovered
|
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()
|
local style = self:style()
|
||||||
return ui.Line {
|
return ui.Line {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue