             selectedRange = @editor.getSelectedBufferRange()
             return [selectedText, selectedRange.end.row]
 
-        cursor = @editor.getCursor()
+        cursor = @editor.getLastCursor()
 
         row = cursor.marker.bufferMarker.range.start.row
         console.log "row:", row


        @subscriptions.add atom.workspace.observeActivePaneItem(@updateCurrentEditor.bind(this))

        @editor = atom.workspace.getActiveEditor()

    deactivate: ->
        @subscriptions.dispose()

                delete @markerBubbleMap[marker.id]

    run: ->
        editor = atom.workspace.getActiveTextEditor()
        language = editor.getGrammar().name.toLowerCase()

        if KernelManager.languageHasKernel(language)
