mirror of
				https://github.com/jesseduffield/lazygit.git
				synced 2025-10-30 23:57:43 +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:
		| @@ -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)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user