anchor.diff:  
       if ch='(' then
       begin
  -      AddArrayItem(Opened, i);
  +      AddArrayItem(OpenedRound, i);
         Inc(LevelRound);
         Continue;
       end;
  
positive.code:     begin
        if LevelRound<1 then
          AddArrayItem(Bads, i);
        Dec(LevelRound);
        DeleteArrayLastItem(Opened);
        Continue;
      end;
    end;
  
    for i:= 0 to High(Opened) do
      AddArrayItem(Bads, Opened[i]);
  
    Ed.Attribs.DeleteWithTag(cTag);
  
  
negative.code:   cTag = 10;
  var
    Ed: TATSynEdit;
    Bads: TATIntArray;
    OpenedRound: TATIntArray;
    OpenedSquare: TATIntArray;
    LevelRound, LevelSquare: integer;
    PartObj: TATLinePartClass;
    S: UnicodeString;
    ch: WideChar;
    i: integer;
  begin
    Ed:= edFind;
    S:= Ed.Text;
    SetLength(Bads, 0);
    SetLength(OpenedRound, 0);
    SetLength(OpenedSquare, 0);
    LevelRound:= 0;
    LevelSquare:= 0;
    i:= 0;
  
    while i<Length(S) do
  