mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-04 22:34:39 +02:00
Return nil columnPositions when not rendering anything
... instead of returning a slice with a single [0] element. This makes it easier to check whether we have columnPositions.
This commit is contained in:
parent
c3d5798c6c
commit
e675025411
@ -54,6 +54,10 @@ func WithPadding(str string, padding int, alignment Alignment) string {
|
||||
// returns a list of strings that should be joined with "\n", and an array of
|
||||
// the column positions
|
||||
func RenderDisplayStrings(displayStringsArr [][]string, columnAlignments []Alignment) ([]string, []int) {
|
||||
if len(displayStringsArr) == 0 {
|
||||
return []string{}, nil
|
||||
}
|
||||
|
||||
displayStringsArr, columnAlignments, removedColumns := excludeBlankColumns(displayStringsArr, columnAlignments)
|
||||
padWidths := getPadWidths(displayStringsArr)
|
||||
columnConfigs := make([]ColumnConfig, len(padWidths))
|
||||
|
Loading…
x
Reference in New Issue
Block a user