This commit is contained in:
Sandeep Somavarapu committed 2018-02-01 21:22:44 +01:00
1 parent 23b09a28e7
commit b722b506f8
2 files changed
+4 -4

No files matched your search

+3 -3
View File
@@ -93,7 +93,7 @@ async function _activate(context: ExtensionContext, disposables: Disposable[]):
}
export function activate(context: ExtensionContext): API {
const config = workspace.getConfiguration('git', null as any as undefined);
const config = workspace.getConfiguration('git', null);
const enabled = config.get<boolean>('enabled');
const disposables: Disposable[] = [];
@@ -104,8 +104,8 @@ export function activate(context: ExtensionContext): API {
if (enabled) {
activatePromise = _activate(context, disposables);
} else {
const onConfigChange = filterEvent(workspace.onDidChangeConfiguration, e => e.affectsConfiguration('git', null as any as undefined));
const onEnabled = filterEvent(onConfigChange, () => workspace.getConfiguration('git', null as any as undefined).get<boolean>('enabled') === true);
const onConfigChange = filterEvent(workspace.onDidChangeConfiguration, e => e.affectsConfiguration('git'));
const onEnabled = filterEvent(onConfigChange, () => workspace.getConfiguration('git', null).get<boolean>('enabled') === true);
activatePromise = eventToPromise(onEnabled)
.then(() => _activate(context, disposables));
+1 -1
View File
@@ -5602,7 +5602,7 @@ declare module 'vscode' {
* @param resource A resource for which the configuration is asked for
* @return The full configuration or a subset.
*/
export function getConfiguration(section?: string, resource?: Uri): WorkspaceConfiguration;
export function getConfiguration(section?: string, resource?: Uri | null): WorkspaceConfiguration;
/**
* An event that is emitted when the [configuration](#WorkspaceConfiguration) changed.