mirror of
https://github.com/atom/atom.git
synced 2026-02-04 03:35:20 -05:00
Subscribe to grammars-loaded event in editor
Previously an error would be logged if this event fired after an editor had been removed.
This commit is contained in:
@@ -417,7 +417,7 @@ class Editor extends View
|
||||
@gutter.widthChanged = (newWidth) =>
|
||||
@scrollView.css('left', newWidth + 'px')
|
||||
|
||||
syntax.on 'grammars-loaded', =>
|
||||
@subscribe syntax, 'grammars-loaded', =>
|
||||
@reloadGrammar()
|
||||
for session in @editSessions
|
||||
session.reloadGrammar() unless session is @activeEditSession
|
||||
|
||||
Reference in New Issue
Block a user