From 14609fc341a2f715da379a2f761a36b4ae2695d9 Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 4 Nov 2009 19:53:23 +0000 Subject: [PATCH] IDE: no auto indent during template editing git-svn-id: trunk@22435 - --- ide/sourceeditor.pp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ide/sourceeditor.pp b/ide/sourceeditor.pp index e153f75e51..7e474910e1 100644 --- a/ide/sourceeditor.pp +++ b/ide/sourceeditor.pp @@ -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