Always return Disposable from maintain{Config,Grammar}

This commit is contained in:
Max Brunsfeld
2016-10-05 12:03:53 -07:00
parent 6064602c80
commit e6cac10a23
2 changed files with 44 additions and 2 deletions

View File

@@ -157,7 +157,7 @@ export default class TextEditorRegistry {
// configuration.
maintainConfig (editor) {
if (this.editorsWithMaintainedConfig.has(editor)) {
return
return new Disposable(noop)
}
this.editorsWithMaintainedConfig.add(editor)
@@ -202,7 +202,7 @@ export default class TextEditorRegistry {
// grammar.
maintainGrammar (editor) {
if (this.editorsWithMaintainedGrammar.has(editor)) {
return
return new Disposable(noop)
}
this.editorsWithMaintainedGrammar.add(editor)
@@ -391,6 +391,8 @@ function shouldEditorUseSoftTabs (editor, tabType, softTabs) {
}
}
function noop () {}
class ScopedSettingsDelegate {
constructor (config) {
this.config = config