     opts.cwd = opts.cwd or atom.project.getPaths()[0] or editorPath or process.env.HOME
 
     termView = new TermView opts
+    model = Terminals.add {
+      local: !!forkPTY,
+      term: termView,
+      title: title,
+    }
+    id = model.id
+    termView.id = id
+
     termView.on 'remove', @handleRemoveTerm.bind this
-
-    @termViews.push? termView
-    process.nextTick () => @emitter.emit 'term', termView
-    termView
-
-  splitTerm: (direction) ->
-    openPanesInSameSplit = atom.config.get 'term3.openPanesInSameSplit'
-    termView = @createTermView()
-    termView.on "click", =>
-
+    termView.on 'click', =>
       # get focus in the terminal
       # avoid double click to get focus
       termView.term.element.focus()
       termView.term.focus()
 
       @focusedTerminal = termView
+
+    termView.onDidChangeTitle () ->
+      if forkPTY
+        model.title = termView.getTitle()
+      else
+        model.title = title + '-' + termView.getTitle()
+
+    @termViews.push? termView
+    process.nextTick () => @emitter.emit 'term', termView
+    termView
+
+  splitTerm: (direction) ->
+    openPanesInSameSplit = atom.config.get 'term3.openPanesInSameSplit'
+    termView = @createTermView()
     direction = capitalize direction
 
     splitter = =>
       pane = activePane["split#{direction}"] items: [termView]
       activePane.termSplits[direction] = pane
       @focusedTerminal = [pane, pane.items[0]]
+      @disposables.add @attachSubscriptions(termView, @focusedTerminal, pane)
 
     activePane = atom.workspace.getActivePane()
     activePane.termSplits or= {}

        if termView.term
          termView.term.constructor._textarea = atomPane

    id = model.id
    termView.id = id

    subscriptions.add termView.onExit () ->
      Terminals.remove id

    subscriptions.add termView.onDidChangeTitle () ->
      if forkPTY
        model.title = termView.getTitle()
      else
        model.title = title + '-' + termView.getTitle()

    item = pane.addItem termView
    pane.activateItem item
    subscriptions.add pane.onWillRemoveItem (itemRemoved, index) =>
      if itemRemoved.item == item
        item.destroy()
        Terminals.remove id
        @disposables.remove subscriptions
        subscriptions.dispose()
    @disposables.add subscriptions
    termView

  createTermView: (forkPTY=true, rows=30, cols=80) ->
    opts =
      runCommand    : atom.config.get 'term3.autoRunCommand'
      shellOverride : atom.config.get 'term3.shellOverride'

  onTerm: (callback) ->
    @emitter.on 'term', callback

  attachSubscriptions: (termView, item, pane) ->
    subscriptions = new CompositeDisposable

    subscriptions.add pane.onDidActivate ->
      console.log "DID ACTIVATE"
      if pane.getActiveItem() == item
        @focusedTerminal = termView
        termView.focus()

    subscriptions.add pane.onDidChangeActiveItem (activeItem) ->
      console.log "DID CHANGE ACTIVE ITEM", activeItem
      if activeItem != termView
        if termView.term
          termView.term.constructor._textarea = null
