 
       # todo - remove emit here and subscribe directly from error-pane-view
       @editorDestroyedSubscription = @atomSharper.onEditorDestroyed (filePath) =>
+        editorsCount = @editors.length
+        while editorsCount--
+          if @editors[editorsCount].buffer.file.path == filePath
+            @editors.splice editorsCount, 1
+
         atom.emit 'atom-sharper:clear-syntax-errors', filePath
 
     detectSyntaxErrorsIn: (editor) =>

        Omni.codecheck null, editor for editor in @editors

    getWordAt: (str, pos) =>
      while pos < str.length && /\W/.test str[pos]
        ++pos



      @decorations[editor.id] = _.flatten decorations

    deactivate: ->
      @editorSubscription.destroy()
