From 2f8e311140831d532c78d4a29a1a65f9cfcf8619 Mon Sep 17 00:00:00 2001 From: Christian Hammacher Date: Thu, 21 Jul 2005 22:29:08 +0000 Subject: [PATCH] because of bail I the editor unindents now on pressing }. have fun! fixed bugs... lalala --- editor/editor2/UnitfrmMain.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/editor2/UnitfrmMain.pas b/editor/editor2/UnitfrmMain.pas index d9c89fde..7c26cbc7 100755 --- a/editor/editor2/UnitfrmMain.pas +++ b/editor/editor2/UnitfrmMain.pas @@ -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;