Just observe the grammar.

This commit is contained in:
joshaber
2016-04-26 10:32:41 -04:00
parent 1c6d9728c4
commit 5d7c2fc8ba
4 changed files with 1 additions and 15 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(@handleGrammarUsed.bind(this))
grammarSubscription = editor.observeGrammar(@handleGrammarUsed.bind(this))
editor.onDidDestroy ->
grammarSubscription.dispose()
disposable.dispose()