         replaced = true
         null
 
-      editorView.moveCursorToTop()
-      editorView.selectToEndOfLine()
+      editor.moveCursorToTop()
+      editor.selectToEndOfLine()
       edited = editorView.replaceSelectedText(replacer)
       expect(replaced).toBe true
       expect(edited).toBe false

        replaced = true
        'new'

      editorView.moveCursorToTop()
      editorView.selectToEndOfLine()
      edited = editorView.replaceSelectedText(replacer)
      expect(replaced).toBe true
      expect(edited).toBe true


          $(document).trigger 'mouseup'

          expect(editor.getSelection().getScreenRange()).toEqual [[1,0], [6,0]]

      describe "when selecting from bottom to top", ->
        it "selects the lines", ->
