Skip to content

Commit

Permalink
Add earlier short circuit to formatLineChanges
Browse files Browse the repository at this point in the history
  • Loading branch information
johannaschwarz committed Nov 12, 2024
1 parent 670b89a commit 222f9a4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/gui/presentation/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ func getFileLine(
output += theme.DefaultTextColor.Sprint(" (submodule)")
}

if lineChanges := formatLineChanges(file); showNumberOfLineChanges && lineChanges != "" {
output += " " + lineChanges
if showNumberOfLineChanges {
if lineChanges := formatLineChanges(file); lineChanges != "" {
output += " " + lineChanges
}
}

return output
Expand Down

0 comments on commit 222f9a4

Please sign in to comment.