diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-08-29 22:07:24 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-08-29 22:19:03 +0200 |
commit | 66199125fd59b24277a8c40a2b55af71306a7d77 (patch) | |
tree | 4c8cce83571e9967cbf8986fdec826039af91094 | |
parent | 2f5e0819e628accbd525d5a727aaf92c31a83247 (diff) | |
download | fpGUI-66199125fd59b24277a8c40a2b55af71306a7d77.tar.xz |
textedit: minor optimization in FormatLine().
If there is no text in the line, no need to process it further.
-rw-r--r-- | examples/apps/ide/src/fpg_textedit.pas | 4 |
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 := ''; |