diff options
Diffstat (limited to 'pkg/gui/presentation')
-rw-r--r-- | pkg/gui/presentation/branches.go | 4 | ||||
-rw-r--r-- | pkg/gui/presentation/commits.go | 8 | ||||
-rw-r--r-- | pkg/gui/presentation/graph/graph.go | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/pkg/gui/presentation/branches.go b/pkg/gui/presentation/branches.go index 4f9a4aba4..9d0625ea1 100644 --- a/pkg/gui/presentation/branches.go +++ b/pkg/gui/presentation/branches.go @@ -79,9 +79,9 @@ func getBranchDisplayStrings( } // Don't bother shortening branch names that are already 3 characters or less - if len(displayName) > utils.Max(availableWidth, 3) { + if len(displayName) > max(availableWidth, 3) { // Never shorten the branch name to less then 3 characters - len := utils.Max(availableWidth, 4) + len := max(availableWidth, 4) displayName = displayName[:len-1] + "…" } coloredName := nameTextStyle.Sprint(displayName) diff --git a/pkg/gui/presentation/commits.go b/pkg/gui/presentation/commits.go index 611fdde8c..c5d5e92e8 100644 --- a/pkg/gui/presentation/commits.go +++ b/pkg/gui/presentation/commits.go @@ -69,7 +69,7 @@ func GetCommitListDisplayStrings( } // this is where my non-TODO commits begin - rebaseOffset := utils.Min(indexOfFirstNonTODOCommit(commits), endIdx) + rebaseOffset := min(indexOfFirstNonTODOCommit(commits), endIdx) filteredCommits := commits[startIdx:endIdx] @@ -80,11 +80,11 @@ func GetCommitListDisplayStrings( if showGraph { // this is where the graph begins (may be beyond the TODO commits depending on startIdx, // but we'll never include TODO commits as part of the graph because it'll be messy) - graphOffset := utils.Max(startIdx, rebaseOffset) + graphOffset := max(startIdx, rebaseOffset) pipeSets := loadPipesets(commits[rebaseOffset:]) - pipeSetOffset := utils.Max(startIdx-rebaseOffset, 0) - graphPipeSets := pipeSets[pipeSetOffset:utils.Max(endIdx-rebaseOffset, 0)] + pipeSetOffset := max(startIdx-rebaseOffset, 0) + graphPipeSets := pipeSets[pipeSetOffset:max(endIdx-rebaseOffset, 0)] graphCommits := commits[graphOffset:endIdx] graphLines := graph.RenderAux( graphPipeSets, diff --git a/pkg/gui/presentation/graph/graph.go b/pkg/gui/presentation/graph/graph.go index a310d98d9..f6ecf6f0c 100644 --- a/pkg/gui/presentation/graph/graph.go +++ b/pkg/gui/presentation/graph/graph.go @@ -42,11 +42,11 @@ func ContainsCommitSha(pipes []*Pipe, sha string) bool { } func (self Pipe) left() int { - return utils.Min(self.fromPos, self.toPos) + return min(self.fromPos, self.toPos) } func (self Pipe) right() int { - return utils.Max(self.fromPos, self.toPos) + return max(self.fromPos, self.toPos) } func RenderCommitGraph(commits []*models.Commit, selectedCommitSha string, getStyle func(c *models.Commit) style.TextStyle) []string { @@ -390,7 +390,7 @@ func equalHashes(a, b string) bool { return false } - length := utils.Min(len(a), len(b)) + length := min(len(a), len(b)) // parent hashes are only stored up to 20 characters for some reason so we'll truncate to that for comparison return a[:length] == b[:length] } |