Make Editor::onDidChangeGrammar emit from Editor

Seems like the initial implementation was to handle the event, unfold 
all then, re-emit the grammar-changed event.
This commit is contained in:
Ben Ogle
2014-09-08 16:32:43 -07:00
parent 1d073173d4
commit 5883e27c60

View File

@@ -305,7 +305,7 @@ class Editor extends Model
@displayBuffer.onDidChangeSoftWrapped(callback)
onDidChangeGrammar: (callback) ->
@displayBuffer.onDidChangeGrammar(callback)
@emitter.on 'did-change-grammar', callback
onDidChangeCharacterWidths: (callback) ->
@displayBuffer.onDidChangeCharacterWidths(callback)
@@ -2534,6 +2534,7 @@ class Editor extends Model
handleGrammarChange: ->
@unfoldAll()
@emit 'grammar-changed'
@emitter.emit 'did-change-grammar'
handleMarkerCreated: (marker) =>
if marker.matchesAttributes(@getSelectionMarkerAttributes())