Skip to content

Commit

Permalink
Multiline indicator only shown if Body is available
Browse files Browse the repository at this point in the history
Cherrypicked with review comments from d7be031 (gitextensions#9253)
  • Loading branch information
gerhardol committed Jun 18, 2021
1 parent e525ef1 commit 7d1035f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions GitUI/UserControls/RevisionGrid/Columns/MessageColumnProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 7d1035f

Please sign in to comment.