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