anchor.diff:    end; //not binary
   
     //is file already opened? activate frame
  -  for i:= 0 to FrameCount-1 do
  -  begin
  -    F:= Frames[i];
  -    if SameFileName(F.FileName, AFileName) then
  -    begin
  -      SetFrame(F);
  -      Result:= F;
  -      Result.SetFocus;
  -      UpdateStatus;
  -      UpdateTreeContents;
  -      Exit
  -    end;
  +  F:= FindFrameOfFilename(AFileName);
  +  if F=nil then
  +    F:= FindFrameOfFilename(AFileName2);
  +  if Assigned(F) then
  +  begin
  +    SetFrame(F);
  +    Result:= F;
  +    Result.SetFocus;
  +    UpdateStatus;
  +    UpdateTreeContents;
  +    Exit
     end;
   
     //preview-tab
  
positive.code:       AIndex: integer; const ARect: TRect);
      procedure DoSidebar_MainMenuClick(Sender: TObject);
      function DoSidebar_TranslatedCaption(const ACaption: string): string;
      procedure FixMainLayout;
      procedure FormFloatBottomOnClose(Sender: TObject; var CloseAction: TCloseAction);
      procedure FormFloatGroups1_OnEmpty(Sender: TObject);
  
negative.code:   Groups.PagesCurrent.Tabs.SwitchTab(ANext);
  end;
  
  function TfmMain.FindFrameOfFilename(const AName: string): TEditorFrame;
  var
    F: TEditorFrame;
    i: integer;
  begin
    Result:= nil;
    if AName='' then exit;
    for i:= 0 to FrameCount-1 do
    begin
      F:= Frames[i];
      if SameFileName(AName, F.GetFileName(F.Ed1)) or
        SameFileName(AName, F.GetFileName(F.Ed2)) then exit(F);
    end;
  end;
  
  
  function TfmMain.DoCheckFilenameOpened(const AName: string): boolean;
  begin
    Result:= Assigned(FindFrameOfFilename(AName));
  end;
  
  procedure TfmMain.DoOps_OpenFile_Default;
  