From b3ef4be15db5c04ff4fdd8280b499ab075d00d31 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Wed, 13 Oct 2021 12:09:36 -0700 Subject: [PATCH] Fixed out-of-bounds text else --- IDE/src/ui/SourceEditWidgetContent.bf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/IDE/src/ui/SourceEditWidgetContent.bf b/IDE/src/ui/SourceEditWidgetContent.bf index 6104ec42..fa6014e8 100644 --- a/IDE/src/ui/SourceEditWidgetContent.bf +++ b/IDE/src/ui/SourceEditWidgetContent.bf @@ -3394,7 +3394,8 @@ namespace IDE.ui int textStartPos = lineChar - (int32)trimmedLineText.Length; String tabStartStr = scope String(); - tabStartStr.Append(lineText, 0, textStartPos); + if (textStartPos > 0) + tabStartStr.Append(lineText, 0, textStartPos); int32 columnPos = (int32)(GetTabbedWidth(tabStartStr, 0) / mCharWidth + 0.001f); if (wantLineColumn > columnPos) {