diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2024-01-12 13:16:25 +0100 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2024-01-22 08:40:03 +0100 |
commit | 36134006c52269b1a80f2b42857f008b47db7e6c (patch) | |
tree | f3b7cafa13773bd43ad79465636f1a630d357ff9 /pkg/gui/context/commit_files_context.go | |
parent | 321583952402b3e0db9fb74482d63783f186a2d6 (diff) |
Add config setting to suppress showing file icons
Diffstat (limited to 'pkg/gui/context/commit_files_context.go')
-rw-r--r-- | pkg/gui/context/commit_files_context.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/gui/context/commit_files_context.go b/pkg/gui/context/commit_files_context.go index 989ca9acb..fbfff7144 100644 --- a/pkg/gui/context/commit_files_context.go +++ b/pkg/gui/context/commit_files_context.go @@ -4,6 +4,7 @@ import ( "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/gui/filetree" "github.com/jesseduffield/lazygit/pkg/gui/presentation" + "github.com/jesseduffield/lazygit/pkg/gui/presentation/icons" "github.com/jesseduffield/lazygit/pkg/gui/style" "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/samber/lo" @@ -33,7 +34,8 @@ func NewCommitFilesContext(c *ContextCommon) *CommitFilesContext { return [][]string{{style.FgRed.Sprint("(none)")}} } - lines := presentation.RenderCommitFileTree(viewModel, c.Git().Patch.PatchBuilder) + showFileIcons := icons.IsIconEnabled() && c.UserConfig.Gui.ShowFileIcons + lines := presentation.RenderCommitFileTree(viewModel, c.Git().Patch.PatchBuilder, showFileIcons) return lo.Map(lines, func(line string, _ int) []string { return []string{line} }) |