anchor.diff:        for IndexX:= IndexXBegin to IndexXEnd do
         begin
           ch:= S[IndexX+1];
  -        if ch=CharFrom then
  +        if (ch=CharFrom) and (GetTokenKind(Ed, IndexX, IndexY)=TokenKind) then
             Inc(Level)
           else
  -        if ch=CharTo then
  +        if (ch=CharTo) and (GetTokenKind(Ed, IndexX, IndexY)=TokenKind) then
           begin
             if Level>0 then
               Dec(Level)
  
positive.code:       exit;
  
    EditorBracket_FindPair(Ed, CharFrom, CharTo, Kind,
      MaxDistance, PosX, PosY, FoundX, FoundY);
    if FoundY<0 then exit;
  
    case Action of
  
negative.code:       for IndexX:= IndexXEnd downto IndexXBegin do
        begin
          ch:= S[IndexX+1];
          if (ch=CharFrom) and (GetTokenKind(Ed, IndexX, IndexY)=TokenKind) then
            Inc(Level)
          else
          if (ch=CharTo) and (GetTokenKind(Ed, IndexX, IndexY)=TokenKind) then
          begin
            if Level>0 then
              Dec(Level)
  