     @getInput()?.querySelector('atom-text-editor')?.getModel()
 
   addBeforeInput: (view, {divider}={divider:true}) ->
-    if @shouldScroll() then @lock 200
+    if @lastCellVisible() then @lock 200
     @items.insertBefore view, @getInput()
     if divider then @divider(true)
     @slideIn view


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

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

    "terminal"

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