mirror of
https://github.com/atom/atom.git
synced 2026-02-16 01:25:13 -05:00
Include injection grammars in active list
Prevents an immediate flicker when restarting Atom with editors open that have injection matches.
This commit is contained in:
@@ -75,7 +75,13 @@ class Workspace extends Model
|
||||
for scopeName in includedGrammarScopes ? []
|
||||
addGrammar(atom.syntax.grammarForScopeName(scopeName))
|
||||
|
||||
addGrammar(editor.getGrammar()) for editor in @getTextEditors()
|
||||
editors = @getTextEditors()
|
||||
addGrammar(editor.getGrammar()) for editor in editors
|
||||
|
||||
if editors.length > 0
|
||||
for grammar in atom.syntax.grammars when grammar.injectionSelector
|
||||
addGrammar(grammar)
|
||||
|
||||
_.uniq(packageNames)
|
||||
|
||||
editorAdded: (editor) ->
|
||||
|
||||
Reference in New Issue
Block a user