anchor.diff:        begin
           Ei := EndOffs;
           Si := StartOffs;
  -        if (I = StartNo) and (I = EndNo) then  // start/end selection on same line
  +        if (ALineIndex = StartNo) and (ALineIndex = EndNo) then  // start/end selection on same line
           begin
             SS := UTF8Copy(S, Si + 1, UTF8Length(S) - Si);
             if Ei > UTF8Length(S) then
  
positive.code:           end
            else
            begin
              if (I > StartNo) and (I = EndNo) then
              begin
                if Ei > UTF8Length(S) then
                  Ei := UTF8Length(S);
  
negative.code:         end
          else
          begin
            if (ALineIndex = StartNo) and (ALineIndex < EndNo) then
            begin
              SS := UTF8Copy(S, Si + 1, UTF8Length(S) - Si);
              R.SetRect(X+(Si * FChrW), Y, (UTF8Length(SS) * FChrW), FChrH);
  