move autoRepositoryDetection implementation

This commit is contained in:
Joao Moreno
2017-12-11 17:51:40 +01:00
parent 7ae85acb65
commit 6793990e25
3 changed files with 9 additions and 15 deletions
+7
View File
@@ -149,6 +149,13 @@ export class Model {
}
private onDidChangeVisibleTextEditors(editors: TextEditor[]): void {
const config = workspace.getConfiguration('git');
const enabled = config.get<boolean>('autoRepositoryDetection') === true;
if (!enabled) {
return;
}
editors.forEach(editor => {
const uri = editor.document.uri;