 
     @editor.getSession().selection.on 'changeCursor', (cursor) =>
       return if @suppressListeners
-      @emit 'ace.change.cursor', @editor.getSession().getSelection().getCursor()
+      @emit 'ace.change.cursor', @getCursor()
 
     @editor.commands.on 'afterExec', (e) =>
       if e.command.name is 'insertstring' and /^[\w.]$/.test e.args

    @isTrimWhiteSpacesEnabled = value


  requestSave: ->

    contents = @getContents()


    @editor.commands.addCommand toCommand(model, exec)


  getCursor: ->

    return  @editor.getSession().getSelection().getCursor()


  setEditorListeners: ->

    { shortcuts } = kd.singletons
