diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index 17d727401d..eb703153cf 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -5157,7 +5157,7 @@ bool wxRichTextParagraph::Layout(wxDC& dc, wxRichTextDrawingContext& context, co // Add the last line - it's the current pos -> last para pos // Substract -1 because the last position is always the end-paragraph position. - if (lastCompletedEndPos <= GetRange().GetEnd()-1) + if ((lastCompletedEndPos < GetRange().GetEnd()-1) || lineCount == 0) { int startOffset = (lineCount == 0 ? startPositionFirstLine : startPositionSubsequentLines); availableRect = wxRect(rect.x + startOffset, rect.y + currentPosition.y,