diff options
Diffstat (limited to 'pkg/commands/patch_manager.go')
-rw-r--r-- | pkg/commands/patch_manager.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pkg/commands/patch_manager.go b/pkg/commands/patch_manager.go index 3f0f0ac06..5191c2348 100644 --- a/pkg/commands/patch_manager.go +++ b/pkg/commands/patch_manager.go @@ -2,7 +2,6 @@ package commands import ( "sort" - "strings" "github.com/jesseduffield/lazygit/pkg/utils" "github.com/sirupsen/logrus" @@ -145,7 +144,13 @@ func (p *PatchManager) RenderEachFilePatch(plain bool) []string { } func (p *PatchManager) RenderAggregatedPatchColored(plain bool) string { - return strings.Join(p.RenderEachFilePatch(plain), "\n") + result := "" + for _, patch := range p.RenderEachFilePatch(plain) { + if patch != "" { + result += patch + "\n" + } + } + return result } func (p *PatchManager) GetFileStatus(filename string) int { |