From 0de7e94e4d313b06ab63dcd484aa85405941e771 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Sat, 29 Jun 2019 15:28:41 -0700 Subject: [PATCH] Preserve code coverage in multiple editors #2608 --- src/goCover.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/goCover.ts b/src/goCover.ts index 133cd7b15..5a4d02e71 100644 --- a/src/goCover.ts +++ b/src/goCover.ts @@ -182,6 +182,7 @@ export function applyCodeCoverageToAllEditors(coverProfilePath: string, packageD setCoverageData(filePath, coverage); }); lines.on('close', () => { + setDecorators(); vscode.window.visibleTextEditors.forEach(applyCodeCoverage); resolve(); }); @@ -238,8 +239,6 @@ export function applyCodeCoverage(editor: vscode.TextEditor) { const cfg = vscode.workspace.getConfiguration('go', editor.document.uri); const coverageOptions = cfg['coverageOptions']; - setDecorators(); - for (const filename in coverageFiles) { if (editor.document.uri.fsPath.endsWith(filename)) { isCoverageApplied = true;