SourceEdtitor: Cleanup after SynEdit change rev 30008 #4aaa8ceb25

git-svn-id: trunk@30009 -
This commit is contained in:
martin 2011-03-24 21:25:35 +00:00
parent 4aaa8ceb25
commit f46538af44

View File

@ -7207,8 +7207,7 @@ var
CodeBuf: TCodeBuffer;
begin
Result:=false;
//SrcEdit:=GetActiveSE;
SrcEdit := Manager.ActiveEditor; // Todo: Each SynEdit needs its own Beautifier, otherwise they call the wrong notebook
SrcEdit := FindSourceEditorWithEditorComponent(TComponent(Editor));
if assigned(Manager) and Assigned(Manager.OnGetIndent) then begin
Result := Manager.OnGetIndent(Sender, SrcEdit, LogCaret, OldLogCaret, FirstLinePos, LastLinePos,
Reason, SetIndentProc);
@ -7549,10 +7548,6 @@ begin
FSourceWindowByFocusList.Remove(AValue);
FSourceWindowByFocusList.Insert(0, AValue);
// Todo: Each synEdit needs it's own beautifier
if SourceEditorCount > 0 then
TSourceEditor(SourceEditors[0]).EditorComponent.Beautifier.OnGetDesiredIndent
:= @TSourceNotebook(ActiveSourceWindow).EditorGetIndent;
if Assigned(OnCurrentCodeBufferChanged) then
OnCurrentCodeBufferChanged(nil);