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

Fix truncation of long branch names containing non-ASCII characters

This commit is contained in:
Stefan Haller
2024-06-22 13:34:41 +02:00
parent 7ec784e2a0
commit d406ec06af
2 changed files with 4 additions and 4 deletions

View File

@ -51,7 +51,7 @@ func Test_getBranchDisplayStrings(t *testing.T) {
useIcons: false,
checkedOutByWorktree: false,
showDivergenceCfg: "none",
expected: []string{"1m", "🍉_special_c"}, // truncated, but shouldn't
expected: []string{"1m", "🍉_special_char"},
},
{
branch: &models.Branch{Name: "branch_name", Recency: "1m"},
@ -202,7 +202,7 @@ func Test_getBranchDisplayStrings(t *testing.T) {
useIcons: false,
checkedOutByWorktree: false,
showDivergenceCfg: "none",
expected: []string{"1m", "🍉_special_…"}, // truncated two runes too much
expected: []string{"1m", "🍉_special_ch…"},
},
{
branch: &models.Branch{Name: "branch_name", Recency: "1m"},