1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

Provide two config keys for configuring the author length in commits view

One is for the normal view, the other for the expanded view.
This commit is contained in:
Stefan Haller
2024-06-15 15:48:18 +02:00
parent 7be82d4713
commit bd782f16dd
6 changed files with 79 additions and 10 deletions

View File

@ -440,10 +440,11 @@ func displayCommit(
mark = fmt.Sprintf("%s ", willBeRebased)
}
authorFunc := authors.ShortAuthor
authorLength := common.UserConfig.Gui.CommitAuthorShortLength
if fullDescription {
authorFunc = authors.LongAuthor
authorLength = common.UserConfig.Gui.CommitAuthorLongLength
}
author := authors.AuthorWithLength(commit.AuthorName, authorLength)
cols := make([]string, 0, 7)
cols = append(
@ -453,7 +454,7 @@ func displayCommit(
bisectString,
descriptionString,
actionString,
authorFunc(commit.AuthorName),
author,
graphLine+mark+tagString+theme.DefaultTextColor.Sprint(name),
)