       @activeEditSession.off()
 
     @activeEditSession = @editSessions[index]
-    @activeEditSessionIndex = index
 
     @unsubscribeFromBuffer() if @buffer
     @buffer = @activeEditSession.buffer

  isFocused: false
  softTabs: true
  tabText: '  '
  editSessions: null
  attached: false
  lineOverdraw: 100


  serialize: ->
    @saveActiveEditSession()

    viewClass: "Editor"
    editSessions: @editSessions.map (session) -> session.serialize()
    activeEditSessionIndex: @getActiveEditSessionIndex()
    isFocused: @isFocused

  copy: ->
    Editor.deserialize(@serialize(), @rootView())
