diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index 82c529fa11..7ac71cfc9f 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -4794,6 +4794,7 @@ bool wxRichTextPlainText::DrawTabbedString(wxDC& dc, const wxTextAttr& attr, con dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); } + wxCoord x_orig = x; while (hasTabs) { // the string has a tab @@ -4805,7 +4806,7 @@ bool wxRichTextPlainText::DrawTabbedString(wxDC& dc, const wxTextAttr& attr, con bool not_found = true; for (int i = 0; i < tabCount && not_found; ++i) { - nextTabPos = tabArray.Item(i); + nextTabPos = tabArray.Item(i) + x_orig; // Find the next tab position. // Even if we're at the end of the tab array, we must still draw the chunk.