Just use the already existing change grammar event.

This commit is contained in:
joshaber
2016-04-25 15:09:03 -04:00
parent 02bbb14052
commit 9014634b3a
4 changed files with 1 additions and 11 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.onDidUseGrammar(@activateGrammar.bind(this))
grammarSubscription = editor.onDidChangeGrammar(@activateGrammar.bind(this))
editor.onDidDestroy ->
grammarSubscription.dispose()
disposable.dispose()