1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

feat(gui): show commit icons

This commit is contained in:
Ryooooooga
2022-04-23 10:41:40 +09:00
parent b07aeda5a6
commit cb13fe7f46
5 changed files with 34 additions and 10 deletions

View File

@ -9,6 +9,7 @@ import (
"github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/gui/presentation/authors"
"github.com/jesseduffield/lazygit/pkg/gui/presentation/graph"
"github.com/jesseduffield/lazygit/pkg/gui/presentation/icons"
"github.com/jesseduffield/lazygit/pkg/gui/style"
"github.com/jesseduffield/lazygit/pkg/theme"
"github.com/jesseduffield/lazygit/pkg/utils"
@ -275,7 +276,10 @@ func displayCommit(
authorFunc = authors.LongAuthor
}
cols := make([]string, 0, 5)
cols := make([]string, 0, 7)
if icons.IsIconEnabled() {
cols = append(cols, shaColor.Sprint(icons.IconForCommit(commit)))
}
cols = append(cols, shaColor.Sprint(commit.ShortSha()))
cols = append(cols, bisectString)
if fullDescription {