Clear GrammarRegistry in AtomEnvironment::reset

This commit is contained in:
Nathan Sobo
2015-10-13 20:09:56 -06:00
parent 3ef6a9b63b
commit 74d644ac73
4 changed files with 3 additions and 5 deletions

View File

@@ -23,7 +23,7 @@
"color": "^0.7.3",
"event-kit": "^1.3.0",
"find-parent-dir": "^0.3.0",
"first-mate": "^5.0.0",
"first-mate": "^5.1.0",
"fs-plus": "^2.8.0",
"fstream": "0.1.24",
"fuzzaldrin": "^2.1",

View File

@@ -69,7 +69,6 @@ beforeEach ->
spyOn(window, "clearTimeout").andCallFake window.fakeClearTimeout
spyOn(atom, 'saveStateSync')
atom.grammars.clearGrammarOverrides()
spyOn(atom.packages, 'resolvePackagePath').andCallThrough()

View File

@@ -246,6 +246,8 @@ class AtomEnvironment extends Model
@commands.clear()
@registerDefaultCommands()
@grammars.clear()
@styles.restoreSnapshot(params?.stylesSnapshot ? [])
@menu.clear()

View File

@@ -123,6 +123,3 @@ class GrammarRegistry extends FirstMate.GrammarRegistry
clearGrammarOverrides: ->
@grammarOverridesByPath = {}
undefined
clearObservers: ->
@emitter = new Emitter