 LinesComponent = require './lines-component'
 ScrollbarComponent = require './scrollbar-component'
 ScrollbarCornerComponent = require './scrollbar-corner-component'
-SubscriberMixin = require './subscriber-mixin'
 
 module.exports =
 TextEditorComponent = React.createClass
   displayName: 'TextEditorComponent'
-  mixins: [SubscriberMixin]
 
   pendingScrollTop: null
   pendingScrollLeft: null

  onSelectionAdded: (selection) ->
    {editor} = @props

    @subscribe selection.onDidChangeRange => @onSelectionChanged(selection)
    @subscribe selection.onDidDestroy =>
      @onSelectionChanged(selection)
      @unsubscribe(selection)

    if editor.selectionIntersectsVisibleRowRange(selection)
      @selectionChanged = true

  componentWillUnmount: ->
    {editor, hostElement} = @props

    @disposables.dispose()
    @presenter.destroy()
    @scopedConfigDisposables.dispose()
    window.removeEventListener 'resize', @requestHeightAndWidthMeasurement
    clearInterval(@domPollingIntervalId)
    @domPollingIntervalId = null
