Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
move disposeDecorators call into setDecorators (#2068)
Browse files Browse the repository at this point in the history
  • Loading branch information
SteelPhase authored and ramya-rao-a committed Nov 1, 2018
1 parent 3ba34e0 commit c96594b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/goCover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ export function updateCodeCoverageDecorators(coverageDecoratorConfig: any) {
decoratorConfig[k] = coverageDecoratorConfig[k];
}
}
disposeDecorators();
setDecorators();
}

function setDecorators() {
disposeDecorators();
decorators = {
type: decoratorConfig.type,
coveredGutterDecorator: vscode.window.createTextEditorDecorationType({ gutterIconPath: gutterSvgs[decoratorConfig.coveredGutterStyle] }),
Expand Down Expand Up @@ -234,7 +234,6 @@ export function applyCodeCoverage(editor: vscode.TextEditor) {

const cfg = vscode.workspace.getConfiguration('go', editor.document.uri);
const coverageOptions = cfg['coverageOptions'];
disposeDecorators();
setDecorators();

for (let filename in coverageFiles) {
Expand Down

0 comments on commit c96594b

Please sign in to comment.