IDE: no auto indent during template editing

git-svn-id: trunk@22435 -
This commit is contained in:
mattias 2009-11-04 19:53:23 +00:00
parent 61804fcfa3
commit 14609fc341

View File

@ -119,6 +119,7 @@ type
FEditPlugin: TSynEditPlugin1; // used to get the LinesInserted and
// LinesDeleted messages
FSyncroEdit: TSynPluginSyncroEdit;
FTemplateEdit: TSynPluginTemplateEdit;
FCodeTemplates: TSynEditAutoComplete;
FHasExecutionMarks: Boolean;
FMarksRequested: Boolean;
@ -399,6 +400,7 @@ type
property SyncroEdit: TSynPluginSyncroEdit read FSyncroEdit;
property SyntaxHighlighterType: TLazSyntaxHighlighter
read fSyntaxHighlighterType write SetSyntaxHighlighterType;
property TemplateEdit: TSynPluginTemplateEdit read FTemplateEdit;
end;
//============================================================================
@ -2569,7 +2571,7 @@ Begin
FCodeTemplates.AddEditor(FEditor);
if aCompletion<>nil then
aCompletion.AddEditor(FEditor);
TSynPluginTemplateEdit.Create(FEditor);
FTemplateEdit:=TSynPluginTemplateEdit.Create(FEditor);
FSyncroEdit := TSynPluginSyncroEdit.Create(FEditor);
bmp := CreateBitmapFromLazarusResource('tsynsyncroedit');
FSyncroEdit.GutterGlyph.Assign(bmp);
@ -6841,6 +6843,7 @@ begin
if Result then exit;
end;
if (SrcEdit.SyncroEdit<>nil) and SrcEdit.SyncroEdit.Active then exit;
if (SrcEdit.TemplateEdit<>nil) and SrcEdit.TemplateEdit.Active then exit;
if not (SrcEdit.SyntaxHighlighterType in [lshFreePascal, lshDelphi]) then
exit;
case Reason of