         @editor.destroy()
       {editor, point}
 
-  # clear text from  2nd row to last row.
-  clearItemsText: ->
-    range = [[1, 0], @editor.getEofBufferPosition()]
-    @editor.setTextInBufferRange(range, '')
-
-  appendText: (text) ->
-    eof = @editor.getEofBufferPosition()
-    if eof.isLessThan([1, 0])
-      eof = @setPromptLine("\n").end
-      @moveToPrompt()
-    @editor.setTextInBufferRange([eof, eof], text)
-
   # Return row
   findNormalItem: (startRow, direction) ->
     maxRow = @items.length - 1

    query = @getNarrowQuery()
    words = _.compact(query.split(/\s+/))
    regexps = words.map (word) => @getRegExpForQueryWord(word)
    @grammar.update(regexps)

    @ignoreChangeOnNarrowEditor = true
    Promise.resolve(@provider.getItems()).then (items) =>
      @clearItemsText()
      @setItems(@provider.filterItems(items, regexps))
      @editorLastRow = @editor.getLastBufferRow()
      @ignoreChangeOnNarrowEditor = false

  ensureNarrowEditorIsValidState: ->
    # Ensure all item have valid line header

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