       @vmpActivateInsertMode() if @vmpIsNormalMode()
 
   constructor: (@provider, {@query, @activate, @pending}={}) ->
+    @titleNumber = @constructor.getNextTitleNumber()
+    console.log @titleNumber
     @pending ?= false
     @activate ?= true
     @disposables = new CompositeDisposable

    @editor = atom.workspace.buildTextEditor(lineNumberGutterVisible: @provider.indentTextForLineHeader)

    providerDashName = @provider.getDashName()
    title = providerDashName + '-' + @constructor.uiByEditor.size
    @editor.getTitle = -> title
    @editor.onDidDestroy(@destroy.bind(this))
    @editorElement = @editor.element
    @editorElement.classList.add('narrow', 'narrow-editor', providerDashName)


  @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
  # -------------------------
