diff --git a/src/Views/CommitSubjectPresenter.cs b/src/Views/CommitSubjectPresenter.cs index bfa2d9ea..d1aeab3f 100644 --- a/src/Views/CommitSubjectPresenter.cs +++ b/src/Views/CommitSubjectPresenter.cs @@ -97,8 +97,12 @@ namespace SourceGit.Views return; var height = Bounds.Height; + var width = Bounds.Width; foreach (var inline in _inlines) { + if (inline.X > width) + return; + if (inline.Element is { Type: Models.InlineElementType.Code}) { var rect = new Rect(inline.X, (height - inline.Text.Height - 2) * 0.5, inline.Text.WidthIncludingTrailingWhitespace + 8, inline.Text.Height + 2);