summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/apps/ide/src/fpg_textedit.pas4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/apps/ide/src/fpg_textedit.pas b/examples/apps/ide/src/fpg_textedit.pas
index e63eb09b..58789664 100644
--- a/examples/apps/ide/src/fpg_textedit.pas
+++ b/examples/apps/ide/src/fpg_textedit.pas
@@ -1587,7 +1587,11 @@ begin
Exit; //==>
if (ALineIndex < 0) or (ALineIndex > FLines.Count-1) then
Exit; //==>
+
S := FLines[ALineIndex];
+ if Length(s) = 0 then
+ Exit; // no text to draw, so we are done
+
if Pos(#9, S) > 0 then
begin
CorrectS := '';