         ensure text: "\nabc\ndef\n"
 
       narrow.waitsForRefresh ->
-        dispatchEditorCommand('narrow:refresh')
+        runCommand('narrow:refresh')
 
       runs ->
         ensure text: originalText
 
   describe "narrow:next-item, narrow:previous-item", ->
-    nextItem = -> runs -> narrow.waitsForConfirm -> dispatchEditorCommand('narrow:next-item')
-    previousItem = -> runs -> narrow.waitsForConfirm -> dispatchEditorCommand('narrow:previous-item')
+    nextItem = -> runs -> narrow.waitsForConfirm -> runCommand('narrow:next-item')
+    previousItem = -> runs -> narrow.waitsForConfirm -> runCommand('narrow:previous-item')
 
     describe "basic behavior", ->
       beforeEach ->

              """

      it "move to next/previous item with wrap", ->
        paneForItem(editor).activate()
        ensureEditorIsActive(editor)
        ensureEditor editor, cursor: [0, 0]

        nextItem(); runs -> ensureEditor editor, cursor: [0, 1]
        nextItem(); runs -> ensureEditor editor, cursor: [0, 2]
        nextItem(); runs -> ensureEditor editor, cursor: [1, 3]
        nextItem(); runs -> ensureEditor editor, cursor: [0, 1]

        previousItem(); runs -> ensureEditor editor, cursor: [1, 3]
        previousItem(); runs -> ensureEditor editor, cursor: [0, 2]
        previousItem(); runs -> ensureEditor editor, cursor: [0, 1]

    describe "when cursor position is contained in item.range", ->
      beforeEach ->


  describe "scan", ->
    describe "with empty qury", ->
      confirm = -> narrow.waitsForDestroy -> runCommand('core:confirm')
      beforeEach ->
        editor.setText(appleGrapeLemmonText)
        editor.setCursorBufferPosition([0, 0])
