@Override
  public int getContentSize() {
    int length;
    Editor editor;
    synchronized (LOCK) {
      length = myDeferredBuffer.length();
      editor = getEditor();
    }
    return (editor == null || CLEAR.hasRequested() ? 0 : editor.getDocument().getTextLength()) + length;
  }
@Override
  public int getContentSize()