because of bail I the editor unindents now on pressing }. have fun!

fixed bugs... lalala
This commit is contained in:
Christian Hammacher 2005-07-21 22:29:08 +00:00
parent 21551a6ea8
commit 2f8e311140

View File

@ -433,7 +433,7 @@ begin
sciEditor.SelText := ' ';
end;
end;
if Key = '}' then begin // YES thats only for bail ;)
if (Key = '}') and (Trim(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) = '') then begin // YES thats only for bail ;)
sciEditor.Lines[sciEditor.GetCurrentLineNumber] := Copy(sciEditor.Lines[sciEditor.GetCurrentLineNumber], 1, Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) -1); // remove last indent..
sciEditor.SelStart := sciEditor.SelStart + Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]); // and jump to last position
end;