From 649679c33a89149935f040c6db5460c1e2b2ff36 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Mon, 23 Mar 2026 15:47:14 +0100 Subject: [PATCH] Remove branch icons from Branches list The only information that this carries is whether an entry is a real branch or a detached head. Detached heads can only be at the top, and they are easy to tell apart from the other branches by their name, so the icon is not really very useful. We are going to show PR icons in this column. --- pkg/gui/presentation/branches.go | 7 ------- pkg/gui/presentation/branches_test.go | 6 +++--- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/pkg/gui/presentation/branches.go b/pkg/gui/presentation/branches.go index 1120ed99a..02cc5bb8b 100644 --- a/pkg/gui/presentation/branches.go +++ b/pkg/gui/presentation/branches.go @@ -63,9 +63,6 @@ func getBranchDisplayStrings( if len(divergence) > 0 { availableWidth -= utils.StringWidth(divergence) + 1 } - if icons.IsIconEnabled() { - availableWidth -= 2 // one for the icon, one for the space - } if showCommitHash { availableWidth -= utils.COMMIT_HASH_SHORT_SIZE + 1 } @@ -136,10 +133,6 @@ func getBranchDisplayStrings( res := make([]string, 0, 6) res = append(res, recencyColor.Sprint(b.Recency)) - if icons.IsIconEnabled() { - res = append(res, nameTextStyle.Sprint(icons.IconForBranch(b))) - } - if showCommitHash { res = append(res, utils.ShortHash(b.CommitHash)) } diff --git a/pkg/gui/presentation/branches_test.go b/pkg/gui/presentation/branches_test.go index 8c646e7d7..5a67d57f2 100644 --- a/pkg/gui/presentation/branches_test.go +++ b/pkg/gui/presentation/branches_test.go @@ -72,7 +72,7 @@ func Test_getBranchDisplayStrings(t *testing.T) { useIcons: true, checkedOutByWorktree: true, showDivergenceCfg: "none", - expected: []string{"1m", "󰘬", "branch_name (󰌹 other-worktree)"}, + expected: []string{"1m", "branch_name (󰌹 other-worktree)"}, }, { branch: &models.Branch{ @@ -219,11 +219,11 @@ func Test_getBranchDisplayStrings(t *testing.T) { branch: &models.Branch{Name: "branch_name", Recency: "1m"}, itemOperation: types.ItemOperationNone, fullDescription: false, - viewWidth: 14, + viewWidth: 12, useIcons: true, checkedOutByWorktree: true, showDivergenceCfg: "none", - expected: []string{"1m", "󰘬", "branc… 󰌹"}, + expected: []string{"1m", "branc… 󰌹"}, }, { branch: &models.Branch{