anchor.diff:      BeforeSelectionText := Copy(fText, fLeftIndex+1, max(fSelectionStart, fLeftIndex) - fLeftIndex);
       SelectionText := Copy(fText, max(fSelectionStart, fLeftIndex)+1, fSelectionEnd - max(fSelectionStart, fLeftIndex));
   
  -    BeforeSelectionW := gRes.Fonts[fFont].GetTextSize(BeforeSelectionText, False, DrawEolSymbol).X;
  -    SelectionW := gRes.Fonts[fFont].GetTextSize(SelectionText, False, DrawEolSymbol).X;
  +    BeforeSelectionW := gRes.Fonts[fFont].GetTextSize(BeforeSelectionText, DoShowMarkup, DrawEolSymbol).X;
  +    SelectionW := gRes.Fonts[fFont].GetTextSize(SelectionText, DoShowMarkup, DrawEolSymbol).X;
   
       TKMRenderUI.WriteShape(SelfAbsLeft+4+BeforeSelectionW, AbsTop+3, min(SelectionW, Width-8), Height-6, clTextSelection);
     end;
  
positive.code:     function KeyEventHandled(Key: Word; Shift: TShiftState): Boolean; override;
      function GetRText: UnicodeString;
      function DrawEolSymbol: Boolean; override;
    public
      Masked: Boolean; //Mask entered text as *s
      MaxLen: Word;
  
negative.code: function TKMEdit.DrawEolSymbol: Boolean;
  begin
    Result := AllowedChars = acAll;
  end;
  
  
  function TKMEdit.DoShowMarkup: Boolean;
  begin
    Result := ShowColors;
  end;
  
  
  