mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user