Revert "Just use the already existing change grammar event."

This reverts commit 9014634b3a.
This commit is contained in:
joshaber
2016-04-25 15:15:31 -04:00
parent 9014634b3a
commit 2266f1e3b6
4 changed files with 11 additions and 1 deletions

View File

@@ -550,7 +550,7 @@ class Workspace extends Model
@project.bufferForPath(filePath, options).then (buffer) =>
editor = @buildTextEditor(_.extend({buffer, largeFileMode}, options))
disposable = atom.textEditors.add(editor)
grammarSubscription = editor.onDidChangeGrammar(@activateGrammar.bind(this))
grammarSubscription = editor.onDidUseGrammar(@activateGrammar.bind(this))
editor.onDidDestroy ->
grammarSubscription.dispose()
disposable.dispose()