mirror of
https://github.com/atom/atom.git
synced 2026-01-22 13:28:01 -05:00
Reload grammar in editor when path changes
This commit is contained in:
@@ -547,7 +547,6 @@ class EditorView extends View
|
||||
@showBufferConflictAlert(@editor)
|
||||
|
||||
@subscribe @editor, "path-changed", =>
|
||||
@editor.reloadGrammar()
|
||||
@trigger 'editor:path-changed'
|
||||
|
||||
@subscribe @editor, "grammar-changed", =>
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user