 
   @updateWorkspaceClassList: ->
     atom.views.getView(atom.workspace).classList.toggle('has-narrow', @uiByEditor.size)
+
+  @getNextTitleNumber: ->
+    titleNumbers = [0]
+    console.log 'size', @uiByEditor.size
+
+    @uiByEditor.forEach (ui) ->
+      titleNumbers.push(ui.titleNumber)
+    Math.max(titleNumbers...) + 1
 
   # UI.prototype
   # -------------------------

      @vmpActivateInsertMode() if @vmpIsNormalMode()

  constructor: (@provider, {@query, @activate, @pending}={}) ->
    @pending ?= false
    @activate ?= true
    @disposables = new CompositeDisposable


    @constructor.register(this)
    @disposables.add new Disposable =>
      console.log "unregister"
      @constructor.unregister(this)

  start: ->
