 
 
     runAllAbove: ->
-        codeBlock = @findCodeBlock(true)
-        unless codeBlock?
-            return
-
-        [code, row] = codeBlock
+        cursor = @editor.getLastCursor()
+        row = cursor.getBufferRow()
+        if row > 0
+            for i in [0 .. row - 1] when @blank(row)
+                row -= 1
+        code = @getRows(0, row)
+
         if code? and row?
             @createResultBubble code, row
 

        row = cursor.getBufferRow()
        console.log 'findCodeBlock:', row

        if runAllAbove
            if row > 0
                for i in [0 .. row - 1] when @blank(row)
                    row -= 1
            return [@getRows(0, row), row]

        indentLevel = cursor.getIndentLevel()

        foldable = @editor.isFoldableAtBufferRow(row)

                    @watchSidebar.show()
        @watchKernelPicker.toggle()

    findCodeBlock: ->
        buffer = @editor.getBuffer()
        selectedText = @editor.getSelectedText()

