1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Add config setting to suppress showing file icons

This commit is contained in:
Stefan Haller
2024-01-12 13:16:25 +01:00
parent 3215839524
commit 36134006c5
7 changed files with 25 additions and 8 deletions

View File

@ -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/types"
"github.com/samber/lo"
)
@ -24,7 +25,8 @@ func NewWorkingTreeContext(c *ContextCommon) *WorkingTreeContext {
)
getDisplayStrings := func(_ int, _ int) [][]string {
lines := presentation.RenderFileTree(viewModel, c.Model().Submodules)
showFileIcons := icons.IsIconEnabled() && c.UserConfig.Gui.ShowFileIcons
lines := presentation.RenderFileTree(viewModel, c.Model().Submodules, showFileIcons)
return lo.Map(lines, func(line string, _ int) []string {
return []string{line}
})