     query = @getNarrowQuery()
     words = _.compact(query.split(/\s+/))
     regexps = words.map (word) => @getRegExpForQueryWord(word)
-    @grammar.update(regexps)
-
     @ignoreChangeOnNarrowEditor = true
+
+    # In case prompt accidentaly mutated
+    eof = @editor.getEofBufferPosition()
+    if eof.isLessThan(@itemAreaStart)
+      eof = @setPromptLine("\n").end
+      @moveToPrompt()
+
     Promise.resolve(@provider.getItems()).then (items) =>
-      @clearItemsText()
-      @setItems(@provider.filterItems(items, regexps))
-      @editorLastRow = @editor.getLastBufferRow()
+      items = @provider.filterItems(items, regexps)
+      @items = [@promptItem, items...]
+      @renderItems(items)
+      @grammar.update(regexps)
+      @selectItemForRow(@findNormalItem(1, 'next'))
+
       @ignoreChangeOnNarrowEditor = false
+
+  renderItems: (items) ->
+    texts = items.map (item) -> @provider.viewForItem(item)
+    itemArea = new Range(@itemAreaStart, @editor.getEofBufferPosition())
+    range = @editor.setTextInBufferRange(itemArea, texts.join("\n")
+    @editorLastRow = range.end.row
 
   ensureNarrowEditorIsValidState: ->
     # Ensure all item have valid line header

_ = require 'underscore-plus'
{Point, CompositeDisposable} = require 'atom'
{
  getAdjacentPaneForPane
  openItemInAdjacentPaneForPane


  constructor: (@provider, {@input}={}) ->
    @disposables = new CompositeDisposable

    # Special item used to translate narrow editor row to items without pain
    @promptItem = Object.freeze({_prompt: true, skip: true})
    @itemAreaStart = Object.freeze(new Point(1, 0))

    @originalPane = atom.workspace.getActivePane()
    @gutterItem = document.createElement('span')
