mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-09 09:49:09 +02:00
Simplify code by removing else block
This commit is contained in:
parent
2d8f8c2d64
commit
e5ec06b3b9
1 changed files with 6 additions and 7 deletions
13
ui/stash.go
13
ui/stash.go
|
|
@ -1236,13 +1236,12 @@ func (m stashModel) headerView() string {
|
|||
if m.filterState == filtering {
|
||||
if localCount+stashedCount+newsCount == 0 {
|
||||
return grayFg("Nothing found.")
|
||||
} else {
|
||||
if localCount > 0 {
|
||||
sections = append(sections, fmt.Sprintf("%d local", localCount))
|
||||
}
|
||||
if stashedCount > 0 {
|
||||
sections = append(sections, fmt.Sprintf("%d stashed", stashedCount))
|
||||
}
|
||||
}
|
||||
if localCount > 0 {
|
||||
sections = append(sections, fmt.Sprintf("%d local", localCount))
|
||||
}
|
||||
if stashedCount > 0 {
|
||||
sections = append(sections, fmt.Sprintf("%d stashed", stashedCount))
|
||||
}
|
||||
|
||||
for i := range sections {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue