Explorar el Código

Avoids adding settings for defaults

main
Eric Amodio hace 6 años
padre
commit
4bd4e71704
Se han modificado 1 ficheros con 7 adiciones y 1 borrados
  1. +7
    -1
      src/pageProvider.ts

+ 7
- 1
src/pageProvider.ts Ver fichero

@ -52,7 +52,13 @@ export class PageProvider extends Disposable implements TextDocumentContentProvi
Logger.log(`PageProvider.save: changes=${JSON.stringify(changes)}`);
for (const key in changes) {
await configuration.update(key, changes[key], ConfigurationTarget.Global);
const inspect = await configuration.inspect(key)!;
if (inspect.defaultValue === changes[key]) {
await configuration.update(key, undefined, ConfigurationTarget.Global);
}
else {
await configuration.update(key, changes[key], ConfigurationTarget.Global);
}
}
}

Cargando…
Cancelar
Guardar