     @currentItemIndicator = new CurrentItemIndicator(@editor)
     @grammar = new Grammar(@editor, includeHeaderRules: @provider.includeHeaderGrammar)
 
+    @disposables.add @onDidMoveToItemArea  => @setReadOnly(true)
+
     @disposables.add(
-      @onDidMoveToItemArea(@onMoveToItemArea.bind(this))
       @registerCommands()
       @observeChange()
       @observeStopChanging()

  itemsByProvider: null # Used to cache result
  lastNarrowQuery: ''
  modifiedState: null

  isModified: ->
    @modifiedState

    @editorElement.component?.setInputEnabled(false)
    @editorElement.classList.add('read-only')
    @vmpActivateNormalMode() if @vmpIsInsertMode()

  setReadOnly: (readOnly) ->
    @readOnly = readOnly
    if @readOnly
      @editorElement.component?.setInputEnabled(false)
      @editorElement.classList.add('read-only')
      @vmpActivateNormalMode() if @vmpIsInsertMode()
    else
      @editorElement.component.setInputEnabled(true)
      @editorElement.classList.remove('read-only')
      @vmpActivateInsertMode() if @vmpIsNormalMode()

  observeStopChangingActivePaneItem: ->
    atom.workspace.onDidStopChangingActivePaneItem (item) =>
