   getCurrentLineRange: ->
     row = @editor.getCursor().getBufferRow()
     lineLength = @editor.lineLengthForBufferRow(row)
-    index = @editor.activeEditSession.indexForBufferPosition({row: row, column: 0})
+    index = @editSession.indexForBufferPosition({row: row, column: 0})
     return {
       start: index,
       end: index + lineLength

emmet = require '../vendor/emmet-core'
utils = emmet.require("utils")

module.exports =
  setupContext: (editor) ->
    @editor = editor
    @indentation = @editor.activeEditSession.getTabText()
    emmet.require("resources").setVariable("indentation", @indentation)

    @syntax = @getSyntax()


  # Returns the currently selected text.
  getSelection: ->
    return @editSession.getSelectedText()

  # Returns the current editor's file path
  getFilePath: ->
