anchor.diff:  
   procedure TEditorFrame.DoLoadHistory(Ed: TATSynEdit; AllowEnc: boolean);
   var
  -  c: TJSONConfig;
  +  cfg: TJSONConfig;
     SFileName: string;
  -  path: UnicodeString;
  +  path: string;
   begin
     SFileName:= GetFileName(Ed);
     if SFileName='' then exit;
  +  path:= SMaskFilenameSlashes(SFileName);
  +
     if UiOps.MaxHistoryFiles<2 then exit;
   
  -  c:= TJsonConfig.Create(nil);
  +  cfg:= TJsonConfig.Create(nil);
     try
       try
  -      c.Formatted:= true;
  -      c.Filename:= AppFile_HistoryFiles;
  +      cfg.Formatted:= true;
  +      cfg.Filename:= AppFile_HistoryFiles;
       except
         MsgBadConfig(AppFile_HistoryFiles);
         exit
       end;
   
  -    path:= UTF8Decode(SMaskFilenameSlashes(SFileName));
  -    DoLoadHistoryEx(Ed, SFileName, c, path, AllowEnc);
  +    DoLoadHistoryEx(Ed, SFileName, cfg, path, AllowEnc);
     finally
  -    c.Free;
  +    cfg.Free;
     end;
   end;
   
  
positive.code: 
    SFileName:= GetFileName(Ed);
    if SFileName='' then exit;
  
    c:= TJsonConfig.Create(nil);
    try
      try
        c.Formatted:= true;
        c.Filename:= AppFile_HistoryFiles;
      except
        MsgBadConfig(AppFile_HistoryFiles);
        exit
      end;
  
      path:= UTF8Decode(SMaskFilenameSlashes(SFileName));
  
      items:= TStringList.Create;
      try
        c.DeletePath(path);
        c.EnumSubKeys('/', items);
        while items.Count>=UiOps.MaxHistoryFiles do
        begin
          c.DeletePath(UTF8Decode('/'+items[0]));
          items.Delete(0);
        end;
      finally
        FreeAndNil(items);
      end;
  
      DoSaveHistoryEx(Ed, c, path);
    finally
      c.Free;
    end;
  end;
  
  
negative.code: 
  procedure TEditorFrame.DoSaveHistory(Ed: TATSynEdit);
  var
    cfg: TJSONConfig;
    SFileName: string;
    path: string;
    items: TStringlist;
  begin
    if not FSaveHistory then exit;
  