anchor.diff:    DoOnChangeCaption;
     DoShow;
   
  -  if Assigned(FBin) then
  -    if FBin.Visible and FBin.CanFocus then
  -    begin
  -      EditorFocus(FBin);
  -      exit;
  +  if Visible and Enabled then
  +  begin
  +    if IsText then
  +    begin
  +      if Editor.Visible and Editor.Enabled then
  +        EditorFocus(Editor);
  +    end
  +    else
  +    if IsBinary then
  +    begin
  +      if Assigned(FBin) and FBin.Visible and FBin.CanFocus then
  +        EditorFocus(FBin);
  +    end
  +    else
  +    if IsPicture then
  +    begin
  +      if Assigned(FImageBox) and FImageBox.Visible and FImageBox.CanFocus then
  +        FImageBox.SetFocus;
       end;
  -
  -  if Assigned(FImageBox) then
  -    if FImageBox.Visible and FImageBox.CanFocus then
  -    begin
  -      FImageBox.SetFocus;
  -      exit;
  -    end;
  -
  -  if Visible and Enabled then
  -    EditorFocus(Editor);
  +  end;
   end;
   
   type
  
positive.code:   AAllowLoadHistory, AAllowLexerDetect, AAllowErrorMsgBox: boolean;
    AOpenMode: TAppOpenMode);
  begin
    if not FileExistsUTF8(AFileName) then exit;
    if (AFileName2<>'') then
      if not FileExistsUTF8(AFileName2) then exit;
  
negative.code:   end;
  
    ViewerApplyTheme(FBin);
    FBin.Show;
    FBin.Mode:= AMode;
    FBin.OpenStream(FBinStream);
  
  