mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
fix: always show the size in the status bar even in empty directories (#2449)
This commit is contained in:
parent
3dc6d82b98
commit
dc46e90b0a
2 changed files with 3 additions and 5 deletions
|
|
@ -24,7 +24,7 @@ Yazi (means "duck") is a terminal file manager written in Rust, based on non-blo
|
|||
- 🌟 **Built-in Code Highlighting and Image Decoding**: Combined with the pre-loading mechanism, greatly accelerates image and normal file loading.
|
||||
- 🔌 **Concurrent Plugin System**: UI plugins (rewriting most of the UI), functional plugins, custom previewer/preloader/spotter/fetcher; Just some pieces of Lua.
|
||||
- 📡 **Data Distribution Service**: Built on a client-server architecture (no additional server process required), integrated with a Lua-based publish-subscribe model, achieving cross-instance communication and state persistence.
|
||||
- 📦 **Package Manager**: Install plugins and themes with one command, keeping them up to date, or pin them to a specific version.
|
||||
- 📦 **Package Manager**: Install plugins and themes with one command, keeping them up-to-date, or pin them to a specific version.
|
||||
- 🧰 Integration with ripgrep, fd, fzf, zoxide
|
||||
- 💫 Vim-like input/pick/confirm/which/notify component, auto-completion for cd paths
|
||||
- 🏷️ Multi-Tab Support, Cross-directory selection, Scrollable Preview (for videos, PDFs, archives, code, directories, etc.)
|
||||
|
|
|
|||
|
|
@ -48,13 +48,11 @@ end
|
|||
|
||||
function Status:size()
|
||||
local h = self._current.hovered
|
||||
if not h then
|
||||
return ""
|
||||
end
|
||||
local size = h and (h:size() or h.cha.len) or 0
|
||||
|
||||
local style = self:style()
|
||||
return ui.Line {
|
||||
ui.Span(" " .. ya.readable_size(h:size() or h.cha.len) .. " "):style(style.alt),
|
||||
ui.Span(" " .. ya.readable_size(size) .. " "):style(style.alt),
|
||||
ui.Span(th.status.sep_left.close):fg(style.alt.bg),
|
||||
}
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue