summaryrefslogtreecommitdiffstats
path: root/pkg/commands/commit.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/commands/commit.go')
-rw-r--r--pkg/commands/commit.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/pkg/commands/commit.go b/pkg/commands/commit.go
index 1df6afbd0..4253a5495 100644
--- a/pkg/commands/commit.go
+++ b/pkg/commands/commit.go
@@ -12,6 +12,7 @@ type Commit struct {
Status string // one of "unpushed", "pushed", "merged", or "rebasing"
DisplayString string
Action string // one of "", "pick", "edit", "squash", "reword", "drop", "fixup"
+ Copied bool // to know if this commit is ready to be cherry-picked somewhere
}
// GetDisplayStrings is a function.
@@ -19,9 +20,14 @@ func (c *Commit) GetDisplayStrings(isFocused bool) []string {
red := color.New(color.FgRed)
yellow := color.New(color.FgYellow)
green := color.New(color.FgGreen)
- white := color.New(color.FgWhite)
blue := color.New(color.FgBlue)
cyan := color.New(color.FgCyan)
+ white := color.New(color.FgWhite)
+
+ // for some reason, setting the background to blue pads out the other commits
+ // horizontally. For the sake of accessibility I'm considering this a feature,
+ // not a bug
+ copied := color.New(color.FgCyan, color.BgBlue)
var shaColor *color.Color
switch c.Status {
@@ -37,6 +43,10 @@ func (c *Commit) GetDisplayStrings(isFocused bool) []string {
shaColor = white
}
+ if c.Copied {
+ shaColor = copied
+ }
+
actionString := ""
if c.Action != "" {
actionString = cyan.Sprint(utils.WithPadding(c.Action, 7)) + " "