       @scrollRight(desiredRight)
     else if desiredLeft < @scrollLeft()
       @scrollLeft(desiredLeft)
-    @saveScrollPositionForeditor()
+    @saveScrollPositionForEditor()
 
   calculateDimensions: ->
     fragment = $('<div class="line" style="position: absolute; visibility: hidden;"><span>x</span></div>')

    return if editor is @editor

    if @editor
      @saveScrollPositionForeditor()
      @editor.off(".editor")

    @editor = editor

        else
          element.removeClass('fold-selected')

  saveScrollPositionForEditor: ->
    if @attached
      @editor.setScrollTop(@scrollTop())
      @editor.setScrollLeft(@scrollLeft())
