mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-28 16:02:01 +03:00
feat(gui): show commit icons
This commit is contained in:
@ -12,8 +12,6 @@ import (
|
||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||
)
|
||||
|
||||
var showFileIcon = false
|
||||
|
||||
const (
|
||||
EXPANDED_ARROW = "▼"
|
||||
COLLAPSED_ARROW = "►"
|
||||
@ -160,7 +158,7 @@ func getFileLine(hasUnstagedChanges bool, hasStagedChanges bool, name string, di
|
||||
isSubmodule := file != nil && file.IsSubmodule(submoduleConfigs)
|
||||
isDirectory := file == nil
|
||||
|
||||
if showFileIcon {
|
||||
if icons.IsIconEnabled() {
|
||||
output += restColor.Sprintf("%s ", icons.IconForFile(name, isSubmodule, isDirectory))
|
||||
}
|
||||
|
||||
@ -199,7 +197,7 @@ func getCommitFileLine(name string, diffName string, commitFile *models.CommitFi
|
||||
isSubmodule := false // TODO: submodule
|
||||
isDirectory := commitFile == nil
|
||||
|
||||
if showFileIcon {
|
||||
if icons.IsIconEnabled() {
|
||||
output += colour.Sprintf("%s ", icons.IconForFile(name, isSubmodule, isDirectory))
|
||||
}
|
||||
|
||||
@ -223,7 +221,3 @@ func getColorForChangeStatus(changeStatus string) style.TextStyle {
|
||||
return theme.DefaultTextColor
|
||||
}
|
||||
}
|
||||
|
||||
func SetShowFileIcon(show bool) {
|
||||
showFileIcon = show
|
||||
}
|
||||
|
Reference in New Issue
Block a user