mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 21:05:48 +02:00
strip whitespace when there is nothing else
This commit is contained in:
parent
861bcc38be
commit
db8c398fa3
2 changed files with 12 additions and 3 deletions
|
@ -194,7 +194,11 @@ func (p *PatchParser) Render(firstLineIndex int, lastLineIndex int, incLineIndic
|
|||
included := utils.IncludesInt(incLineIndices, index)
|
||||
renderedLines[index] = patchLine.render(selected, included)
|
||||
}
|
||||
return strings.Join(renderedLines, "\n")
|
||||
result := strings.Join(renderedLines, "\n")
|
||||
if strings.TrimSpace(utils.Decolorise(result)) == "" {
|
||||
return ""
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
// GetNextStageableLineIndex takes a line index and returns the line index of the next stageable line
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue