 
     it "shows an icon when search wraps around and the editor scrolls", ->
       editorView.style.height = "80px"
+      editor.update?({autoHeight: false})
       atom.views.performDocumentPoll()
       expect(editor.getVisibleRowRange()).toEqual [0, 3]
 


    it "does not show the wrap icon when the editor does not scroll", ->
      editorView.style.height = "400px"
      atom.views.performDocumentPoll()
      expect(editor.getVisibleRowRange()).toEqual [0, 12]


        findView.findEditor.focus()

      it "scrolls to the first match if the settings scrollToResultOnLiveSearch is true", ->
        editorView.style.height = "3px"
        editor.update?({autoHeight: false})
        atom.views.performDocumentPoll()
        editor.moveToTop()
        atom.config.set('find-and-replace.scrollToResultOnLiveSearch', true)
        findView.findEditor.setText 'Array'
        advance()
        expect(editorView.getScrollTop()).toBeGreaterThan(0)
        expect(editor.getSelectedBufferRange()).toEqual [[11, 14], [11, 19]]
        expect(findView.findEditor).toHaveFocus()

      it "doesn't scroll to the first match if the settings scrollToResultOnLiveSearch is false", ->
        editorView.style.height = "3px"
        editor.update?({autoHeight: false})
        atom.views.performDocumentPoll()
        editor.moveToTop()
        atom.config.set('find-and-replace.scrollToResultOnLiveSearch', false)
        findView.findEditor.setText 'Array'
        advance()
        expect(editorView.getScrollTop()).toBe(0)
        expect(editor.getSelectedBufferRange()).toEqual []
        expect(findView.findEditor).toHaveFocus()

