diff --git a/editor/studio/UnitCodeUtils.pas b/editor/studio/UnitCodeUtils.pas index 27b52148..2930db9e 100755 --- a/editor/studio/UnitCodeUtils.pas +++ b/editor/studio/UnitCodeUtils.pas @@ -155,7 +155,7 @@ begin for k := 1 to eIndent + eTempIndent do frmMain.sciEditor.Lines[i] := ' ' + frmMain.sciEditor.Lines[i]; - if eTempIndent <> 0 then + if eTempIndent > 0 then eTempIndent := eTempIndent -1; if (IsAtStart('if', eStr[i], True)) and (Pos('{', eStr[i]) = 0) and (Length(eStr[i]) > 3) then begin