From 7d1035f9fb79ba3e06c4e19d85786b57fb5adbc0 Mon Sep 17 00:00:00 2001 From: Gerhard Olsson Date: Fri, 18 Jun 2021 22:33:11 +0200 Subject: [PATCH] Multiline indicator only shown if Body is available Cherrypicked with review comments from d7be0313e3f84b79d897951a70b06283ab36b771 (#9253) --- .../RevisionGrid/Columns/MessageColumnProvider.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/GitUI/UserControls/RevisionGrid/Columns/MessageColumnProvider.cs b/GitUI/UserControls/RevisionGrid/Columns/MessageColumnProvider.cs index 17b416cfc87..34b9f9c215a 100644 --- a/GitUI/UserControls/RevisionGrid/Columns/MessageColumnProvider.cs +++ b/GitUI/UserControls/RevisionGrid/Columns/MessageColumnProvider.cs @@ -405,16 +405,14 @@ void DrawSuperProjectRef(string label, ref int currentOffset) return; } - if (lines.Length == 1) + if (lines.Length > 1) { - return; + var commitBody = string.Concat(lines.Skip(1).Select(_ => " " + _)); + var bodyBounds = messageBounds.ReduceLeft(offset); + var bodyWidth = _grid.DrawColumnText(e, commitBody, font, style.CommitBodyForeColor, bodyBounds); + offset += bodyWidth; } - var commitBody = string.Concat(lines.Skip(1).Select(_ => " " + _)); - var bodyBounds = messageBounds.ReduceLeft(offset); - var bodyWidth = _grid.DrawColumnText(e, commitBody, font, style.CommitBodyForeColor, bodyBounds); - offset += bodyWidth; - // Draw the multi-line indicator indicator.Render(); }