public void SetPresenter(TextPresenter presenter)
 {
     _subscription?.Dispose();
     _subscription = null;
     _presenter    = presenter;
     if (_presenter != null)
     {
         _subscription = _presenter.GetObservable(TextPresenter.CaretIndexProperty)
                         .Subscribe(OnCaretIndexChanged);
     }
     TextViewVisualChanged?.Invoke(this, EventArgs.Empty);
     CursorRectangleChanged?.Invoke(this, EventArgs.Empty);
 }