Another new name.

This commit is contained in:
joshaber
2016-04-25 15:34:44 -04:00
parent eaf6036a2c
commit cf1b4e2217

View File

@@ -550,13 +550,13 @@ 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.onDidUseGrammar(@handleGrammarUsed.bind(this))
editor.onDidDestroy ->
grammarSubscription.dispose()
disposable.dispose()
editor
activateGrammar: (grammar) ->
handleGrammarUsed: (grammar) ->
@packageManager.triggerActivationHook("#{grammar.packageName}:grammar-used")
# Public: Returns a {Boolean} that is `true` if `object` is a `TextEditor`.