             expect(editor.getCursorBufferPosition()).toEqual [1, 0]
 
     describe "using search history", ->
-      normalEditor = null
+      inputEditor = null
 
       beforeEach ->
         keydown('/')

        submitNormalModeInputText('abc')
        expect(editor.getCursorBufferPosition()).toEqual [2, 0]

        normalEditor = editor.normalModeInputView.editorElement

      it "allows searching history in the search field", ->
        keydown('/')
        atom.commands.dispatch(normalEditor, 'core:move-up')
        expect(normalEditor.getModel().getText()).toEqual('abc')
        atom.commands.dispatch(normalEditor, 'core:move-up')
        expect(normalEditor.getModel().getText()).toEqual('def')
        atom.commands.dispatch(normalEditor, 'core:move-up')
        expect(normalEditor.getModel().getText()).toEqual('def')

      it "resets the search field to empty when scrolling back", ->
        keydown('/')
        atom.commands.dispatch(normalEditor, 'core:move-up')
        expect(normalEditor.getModel().getText()).toEqual('abc')
        atom.commands.dispatch(normalEditor, 'core:move-up')
        expect(normalEditor.getModel().getText()).toEqual('def')
        atom.commands.dispatch(normalEditor, 'core:move-down')
        expect(normalEditor.getModel().getText()).toEqual('abc')
        atom.commands.dispatch(normalEditor, 'core:move-down')
        expect(normalEditor.getModel().getText()).toEqual ''

  describe "the * keybinding", ->
    beforeEach ->

    editor.normalModeInputView.editorElement.getModel().setText(key)

  submitNormalModeInputText = (text) ->
    inputEditor = editor.normalModeInputView.editorElement
    inputEditor.getModel().setText(text)
    atom.commands.dispatch(inputEditor, "core:confirm")

  describe "simple motions", ->
    beforeEach ->
