@@ -128,45 +128,40 @@ export class Configuration extends BaseConfiguration {
128128 }
129129
130130 compareAndUpdateLocalUserConfiguration ( user : ConfigurationModel ) : ConfigurationChangeEvent {
131- const { added, updated, removed } = compare ( this . localUserConfiguration , user ) ;
132- let changedKeys = [ ...added , ...updated , ...removed ] ;
133- if ( changedKeys . length ) {
131+ const { added, updated, removed, overrides } = compare ( this . localUserConfiguration , user ) ;
132+ const keys = [ ...added , ...updated , ...removed ] ;
133+ if ( keys . length ) {
134134 super . updateLocalUserConfiguration ( user ) ;
135135 }
136- return new ConfigurationChangeEvent ( ) . change ( changedKeys ) ;
136+ return new ConfigurationChangeEvent ( ) . change ( { keys , overrides } ) ;
137137 }
138138
139139 compareAndUpdateRemoteUserConfiguration ( user : ConfigurationModel ) : ConfigurationChangeEvent {
140- const { added, updated, removed } = compare ( this . remoteUserConfiguration , user ) ;
141- let changedKeys = [ ...added , ...updated , ...removed ] ;
142- if ( changedKeys . length ) {
140+ const { added, updated, removed, overrides } = compare ( this . remoteUserConfiguration , user ) ;
141+ let keys = [ ...added , ...updated , ...removed ] ;
142+ if ( keys . length ) {
143143 super . updateRemoteUserConfiguration ( user ) ;
144144 }
145- return new ConfigurationChangeEvent ( ) . change ( changedKeys ) ;
145+ return new ConfigurationChangeEvent ( ) . change ( { keys , overrides } ) ;
146146 }
147147
148148 compareAndUpdateWorkspaceConfiguration ( workspaceConfiguration : ConfigurationModel ) : ConfigurationChangeEvent {
149- const { added, updated, removed } = compare ( this . workspaceConfiguration , workspaceConfiguration ) ;
150- let changedKeys = [ ...added , ...updated , ...removed ] ;
151- if ( changedKeys . length ) {
149+ const { added, updated, removed, overrides } = compare ( this . workspaceConfiguration , workspaceConfiguration ) ;
150+ let keys = [ ...added , ...updated , ...removed ] ;
151+ if ( keys . length ) {
152152 super . updateWorkspaceConfiguration ( workspaceConfiguration ) ;
153153 }
154- return new ConfigurationChangeEvent ( ) . change ( changedKeys ) ;
154+ return new ConfigurationChangeEvent ( ) . change ( { keys , overrides } ) ;
155155 }
156156
157157 compareAndUpdateFolderConfiguration ( resource : URI , folderConfiguration : ConfigurationModel ) : ConfigurationChangeEvent {
158158 const currentFolderConfiguration = this . folderConfigurations . get ( resource ) ;
159- if ( currentFolderConfiguration ) {
160- const { added, updated, removed } = compare ( currentFolderConfiguration , folderConfiguration ) ;
161- let changedKeys = [ ...added , ...updated , ...removed ] ;
162- if ( changedKeys . length ) {
163- super . updateFolderConfiguration ( resource , folderConfiguration ) ;
164- }
165- return new ConfigurationChangeEvent ( ) . change ( changedKeys , resource ) ;
166- } else {
159+ const { added, updated, removed, overrides } = compare ( currentFolderConfiguration , folderConfiguration ) ;
160+ let keys = [ ...added , ...updated , ...removed ] ;
161+ if ( keys . length ) {
167162 super . updateFolderConfiguration ( resource , folderConfiguration ) ;
168- return new ConfigurationChangeEvent ( ) . change ( folderConfiguration . keys , resource ) ;
169163 }
164+ return new ConfigurationChangeEvent ( ) . change ( { keys, overrides } , resource ) ;
170165 }
171166
172167 compareAndDeleteFolderConfiguration ( folder : URI ) : ConfigurationChangeEvent {
@@ -178,9 +173,9 @@ export class Configuration extends BaseConfiguration {
178173 if ( ! folderConfig ) {
179174 throw new Error ( 'Unknown folder' ) ;
180175 }
181- const keys = folderConfig . keys ;
182176 super . deleteFolderConfiguration ( folder ) ;
183- return new ConfigurationChangeEvent ( ) . change ( keys , folder ) ;
177+ const { added, updated, removed, overrides } = compare ( folderConfig , undefined ) ;
178+ return new ConfigurationChangeEvent ( ) . change ( { keys : [ ...added , ...updated , ...removed ] , overrides } , folder ) ;
184179 }
185180
186181 compare ( other : Configuration ) : string [ ] {
@@ -208,7 +203,8 @@ export class AllKeysConfigurationChangeEvent extends AbstractConfigurationChange
208203 get changedConfiguration ( ) : ConfigurationModel {
209204 if ( ! this . _changedConfiguration ) {
210205 this . _changedConfiguration = new ConfigurationModel ( ) ;
211- this . updateKeys ( this . _changedConfiguration , this . affectedKeys ) ;
206+ const { added, updated, removed, overrides } = compare ( undefined , this . _changedConfiguration ) ;
207+ this . updateKeys ( this . _changedConfiguration , { keys : [ ...added , ...updated , ...removed ] , overrides } ) ;
212208 }
213209 return this . _changedConfiguration ;
214210 }
0 commit comments