   scrollToTop: ->
     Grim.deprecate("This is now a view method. Call TextEditorElement::scrollToTop instead.")
 
-    @viewRegistry.getView(this).scrollToTop()
+    @getElement().scrollToTop()
 
   scrollToBottom: ->
     Grim.deprecate("This is now a view method. Call TextEditorElement::scrollToTop instead.")
 
-    @viewRegistry.getView(this).scrollToBottom()
+    @getElement().scrollToBottom()
 
   scrollToScreenRange: (screenRange, options) -> @displayBuffer.scrollToScreenRange(screenRange, options)
 
   getHorizontalScrollbarHeight: ->
     Grim.deprecate("This is now a view method. Call TextEditorElement::getHorizontalScrollbarHeight instead.")
 
-    @viewRegistry.getView(this).getHorizontalScrollbarHeight()
+    @getElement().getHorizontalScrollbarHeight()
 
   getVerticalScrollbarWidth: ->
     Grim.deprecate("This is now a view method. Call TextEditorElement::getVerticalScrollbarWidth instead.")
 
-    @viewRegistry.getView(this).getVerticalScrollbarWidth()
+    @getElement().getVerticalScrollbarWidth()
 
   pageUp: ->
     @moveUp(@getRowsPerPage())

  getScrollTop: ->
    Grim.deprecate("This is now a view method. Call TextEditorElement::getScrollTop instead.")

    @viewRegistry.getView(this).getScrollTop()

  setScrollTop: (scrollTop) ->
    Grim.deprecate("This is now a view method. Call TextEditorElement::setScrollTop instead.")

    @viewRegistry.getView(this).setScrollTop(scrollTop)

  getScrollBottom: ->
    Grim.deprecate("This is now a view method. Call TextEditorElement::getScrollBottom instead.")

    @viewRegistry.getView(this).getScrollBottom()

  setScrollBottom: (scrollBottom) ->
    Grim.deprecate("This is now a view method. Call TextEditorElement::setScrollBottom instead.")

    @viewRegistry.getView(this).setScrollBottom(scrollBottom)

  getScrollLeft: ->
    Grim.deprecate("This is now a view method. Call TextEditorElement::getScrollLeft instead.")

    @viewRegistry.getView(this).getScrollLeft()

  setScrollLeft: (scrollLeft) ->
    Grim.deprecate("This is now a view method. Call TextEditorElement::setScrollLeft instead.")

    @viewRegistry.getView(this).setScrollLeft(scrollLeft)

  getScrollRight: ->
    Grim.deprecate("This is now a view method. Call TextEditorElement::getScrollRight instead.")

    @viewRegistry.getView(this).getScrollRight()

  setScrollRight: (scrollRight) ->
    Grim.deprecate("This is now a view method. Call TextEditorElement::setScrollRight instead.")

    @viewRegistry.getView(this).setScrollRight(scrollRight)

  getScrollHeight: ->
    Grim.deprecate("This is now a view method. Call TextEditorElement::getScrollHeight instead.")

    @viewRegistry.getView(this).getScrollHeight()

  getScrollWidth: ->
    Grim.deprecate("This is now a view method. Call TextEditorElement::getScrollWidth instead.")

    @viewRegistry.getView(this).getScrollWidth()

  getMaxScrollTop: ->
    Grim.deprecate("This is now a view method. Call TextEditorElement::getMaxScrollTop instead.")

    @viewRegistry.getView(this).getMaxScrollTop()

  intersectsVisibleRowRange: (startRow, endRow) ->
    Grim.deprecate("This is now a view method. Call TextEditorElement::intersectsVisibleRowRange instead.")

    @viewRegistry.getView(this).intersectsVisibleRowRange(startRow, endRow)

  selectionIntersectsVisibleRowRange: (selection) ->
    Grim.deprecate("This is now a view method. Call TextEditorElement::selectionIntersectsVisibleRowRange instead.")

    @viewRegistry.getView(this).selectionIntersectsVisibleRowRange(selection)

  screenPositionForPixelPosition: (pixelPosition) ->
    Grim.deprecate("This is now a view method. Call TextEditorElement::screenPositionForPixelPosition instead.")

    @viewRegistry.getView(this).screenPositionForPixelPosition(pixelPosition)

  pixelRectForScreenRange: (screenRange) ->
    Grim.deprecate("This is now a view method. Call TextEditorElement::pixelRectForScreenRange instead.")

    @viewRegistry.getView(this).pixelRectForScreenRange(screenRange)

  ###
  Section: Utility


  pixelPositionForBufferPosition: (bufferPosition) ->
    Grim.deprecate("This method is deprecated on the model layer. Use `TextEditorElement::pixelPositionForBufferPosition` instead")
    @getElement().pixelPositionForBufferPosition(bufferPosition)

  pixelPositionForScreenPosition: (screenPosition) ->
    Grim.deprecate("This method is deprecated on the model layer. Use `TextEditorElement::pixelPositionForScreenPosition` instead")
    @getElement().pixelPositionForScreenPosition(screenPosition)

  getSelectionMarkerAttributes: ->
    {type: 'selection', invalidate: 'never'}
