diff --git a/src/editor-view.coffee b/src/editor-view.coffee index 1d4d6a475..18f8a2427 100644 --- a/src/editor-view.coffee +++ b/src/editor-view.coffee @@ -547,7 +547,6 @@ class EditorView extends View @showBufferConflictAlert(@editor) @subscribe @editor, "path-changed", => - @editor.reloadGrammar() @trigger 'editor:path-changed' @subscribe @editor, "grammar-changed", => diff --git a/src/editor.coffee b/src/editor.coffee index 161a4455c..96bb72307 100644 --- a/src/editor.coffee +++ b/src/editor.coffee @@ -200,6 +200,8 @@ class Editor extends Model atom.project.setPath(path.dirname(@getPath())) @emit "title-changed" @emit "path-changed" + @reloadGrammar() + @subscribe @buffer, "contents-modified", => @emit "contents-modified" @subscribe @buffer, "contents-conflicted", => @emit "contents-conflicted" @subscribe @buffer, "modified-status-changed", => @emit "modified-status-changed"