anchor.diff:        or ((Ord(aText[I]) >= $3040) and (Ord(aText[I]) <= $30ff)) then
       begin
         LastWrappable := I;
  +      AfterWrapClMarkup := LastColorMarkup;
         PrevX := dx; //dx does not include this char yet, since we are wrapping before it
         LastWrappableIsSpace := False;
       end;
   
       //Ignore color markups [$FFFFFF][]
       if (aText[I] = '[') and (I+1 <= Length(aText)) and (aText[I+1] = ']') then
  -      Inc(I) //Skip past this markup
  -    else
  +    begin
  +      LastColorMarkup := '';
  +      Inc(I); //Skip past end of color markup
  +    end else
         if (aText[I] = '[') and (I+8 <= Length(aText))
           and (aText[I+1] = '$') and (aText[I+8] = ']')
           and TryStrToInt(Copy(aText, I+1, 7), TmpColor) then
  -        Inc(I,8) //Skip past this markup
  -      else if (aText[I] = #9) then
  +      begin
  +        LastColorMarkup := Copy(aText, I, 9);
  +        Inc(I,8); //Skip past start of color markup
  +      end else if (aText[I] = #9) then
           dx := (Floor(dx / aTabWidth) + 1) * aTabWidth
         else
           Inc(dx, GetCharWidth(aText[I]));
  
positive.code:   PrevX := 0;
    LastWrappable := -1;
    LastWrappableIsSpace := False;
  
    I := 1;
    while I <= Length(aText) do
  
negative.code:     if SysUtils.CharInSet(aText[I], [#9,#32,#124]) then
      begin
        LastWrappable := I;
        AfterWrapClMarkup := LastColorMarkup;
        PrevX := dx;
        LastWrappableIsSpace := True;
      end;
  