anchor.diff:    X1, Y1, X2, Y2: integer;
     NCaret: integer;
     bSel, bBackwardSel: boolean;
  +  bQuoteChar: boolean;
     CharEnd: atChar;
     Shift, PosAfter: TPoint;
   begin
  
positive.code:   Result:= true;
    NPos:= Caret.PosX;
    Str:= Ed.Strings.Lines[Caret.PosY];
    //don't do, if before caret is \
    if (NPos>=1) and (NPos<=Length(Str)) and (Str[NPos]='\') then
      exit(false);
    //don't do, if caret before text
    if (NPos<Length(Str)) and
      not Editor_NextCharAllowed_AutoCloseBracket(Str[NPos+1]) then
        exit(false);
  end;
  
  function EditorAutoPairChar(Ed: TATSynEdit; CharBegin: atChar): boolean;
  
negative.code:     bBackwardSel:= not Caret.IsForwardSelection;
  
      if not bSel then
        if not EditorAutoCloseBracket_NeedPair(Ed, Caret, bQuoteChar) then Continue;
  
      if not bSel then
      begin
  