Skip to content

Commit

Permalink
fix(ui): display "1" when there's only one page to display
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Oct 24, 2023
1 parent f97846f commit 7517d55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/ui/pages/repo/refs.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ func (r *Refs) StatusBarValue() string {
// StatusBarInfo implements statusbar.StatusBar.
func (r *Refs) StatusBarInfo() string {
totalPages := r.selector.TotalPages()
if totalPages > 1 {
return fmt.Sprintf("p. %d/%d", r.selector.Page()+1, totalPages)
if totalPages <= 1 {
return "p. 1/1"
}
return ""
return fmt.Sprintf("p. %d/%d", r.selector.Page()+1, totalPages)
}

func (r *Refs) updateItemsCmd() tea.Msg {
Expand Down

0 comments on commit 7517d55

Please sign in to comment.