     "terminal"
 
   addItem: (view, {divider}={divider:true}) ->
-    scroll = @shouldScroll()
+    scroll = @lastCellVisible()
     @fadeIn view
     @items.appendChild view
     if divider then @divider()


  last: (xs) -> xs[xs.length-1]

  shouldScroll: ->
    items = @items.querySelectorAll('.cell')
    return false unless items[0]
    @isVisible @scrollView, @last items

    @getInput()?.querySelector('atom-text-editor')?.getModel()

  addBeforeInput: (view, {divider}={divider:true}) ->
    if @lastCellVisible() then @lock 200
    @items.insertBefore view, @getInput()
    if divider then @divider(true)
    @slideIn view
