mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
🐎 Avoid building unnecessary scope chains
This commit is contained in:
@@ -116,7 +116,7 @@ export default class TextEditorRegistry {
|
||||
this.subscriptions.add(
|
||||
this.config.onDidChange(settingKey, configOptions, ({newValue}) => {
|
||||
this.editorsWithMaintainedConfig.forEach(editor => {
|
||||
if (editor.getRootScopeDescriptor().getScopeChain() === scopeChain) {
|
||||
if (editor.getRootScopeDescriptor().isEqual(scopeDescriptor)) {
|
||||
editor[setterName](newValue)
|
||||
}
|
||||
})
|
||||
@@ -129,7 +129,7 @@ export default class TextEditorRegistry {
|
||||
const softTabs = this.config.get('editor.softTabs', configOptions)
|
||||
|
||||
this.editorsWithMaintainedConfig.forEach(editor => {
|
||||
if (editor.getRootScopeDescriptor().getScopeChain() === scopeChain) {
|
||||
if (editor.getRootScopeDescriptor().isEqual(scopeDescriptor)) {
|
||||
editor.setSoftTabs(shouldEditorUseSoftTabs(editor, tabType, softTabs))
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user