Skip to content

Commit

Permalink
fix: show "0/0" instead of "1/0" in empty directories (#1925)
Browse files Browse the repository at this point in the history
  • Loading branch information
Integral-Tech authored Nov 21, 2024
1 parent e965b86 commit 202751b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yazi-plugin/preset/components/status.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function Status:position()
local style = self:style()
return ui.Line {
ui.Span(THEME.status.separator_open):fg(style.bg):bg(THEME.status.separator_style.fg),
ui.Span(string.format(" %2d/%-2d ", cursor + 1, length)):style(style),
ui.Span(string.format(" %2d/%-2d ", math.min(cursor + 1, length), length)):style(style),
ui.Span(THEME.status.separator_close):fg(style.bg),
}
end
Expand Down

0 comments on commit 202751b

Please sign in to comment.