diff --git a/ide/main.pp b/ide/main.pp index 55c4aa2d75..5d9878e044 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -3568,7 +3568,7 @@ begin Project1.RemoveUnit(i); end; -writeln('TMainIDE.DoCloseEditorUnit end'); + writeln('TMainIDE.DoCloseEditorUnit end'); Result:=mrOk; end; @@ -6372,6 +6372,9 @@ end. { ============================================================================= $Log$ + Revision 1.298 2002/05/16 15:51:48 lazarus + MG: closing editor now switches to left editor + Revision 1.297 2002/05/16 14:35:19 lazarus MG: fixed codetools error jumping diff --git a/ide/uniteditor.pp b/ide/uniteditor.pp index e2090b930b..32412770b1 100644 --- a/ide/uniteditor.pp +++ b/ide/uniteditor.pp @@ -2850,6 +2850,9 @@ writeln('TSourceNotebook.CloseFile A PageIndex=',PageIndex); if Notebook.Pages.Count>1 then begin //writeln('TSourceNotebook.CloseFile B PageIndex=',PageIndex); Notebook.Pages.Delete(PageIndex); + // switch to left PageIndex + if PageIndex>0 then + Notebook.PageIndex:=PageIndex-1; //writeln('TSourceNotebook.CloseFile C PageIndex=',PageIndex); UpdateStatusBar; end else begin