anchor.diff:    MaxDistance: integer;
     out FoundX, FoundY: integer);
   var
  -  TokenKind: TATFinderTokenKind;
     Level: integer;
     Kind: TATEditorBracketKind;
     ch, ch2: atChar;
  
positive.code:   S: atString;
    IndexX, IndexY, IndexXBegin, IndexXEnd: integer;
    Level: integer;
    TokenKind: TATFinderTokenKind;
    ch: atChar;
  begin
    FoundX:= -1;
    FoundY:= -1;
    Level:= 0;
    St:= Ed.Strings;
    TokenKind:= EditorGetTokenKind(Ed, FromX, FromY);
  
    if Kind=bracketOpening then
    begin
  
negative.code:     //find opening bracket backwards
      if Kind=bracketUnknown then
      begin
        EditorBracket_FindOpeningBracketBackward(Ed,
          PosX, PosY,
          AllowedSymbols,
          MaxDistance,
          FoundX, FoundY);
        if FoundY<0 then exit;
        PosX:= FoundX;
        PosY:= FoundY;
  