diff --git a/vscode-extensions/commons-vscode/src/highlight-service.ts b/vscode-extensions/commons-vscode/src/highlight-service.ts index 81b8e265a..cd7915166 100644 --- a/vscode-extensions/commons-vscode/src/highlight-service.ts +++ b/vscode-extensions/commons-vscode/src/highlight-service.ts @@ -41,13 +41,15 @@ export class HighlightService { } refresh(uri : String) { - let editor = VSCode.window.activeTextEditor; - let activeUri = editor.document.uri.toString(); - if (uri===activeUri) { - //We only update highlights in the active editor for now - let highlights : Range[] = this.highlights.get(uri) || []; - let decorations = highlights.map(hl => toDecoration(hl)); - editor.setDecorations(this.DECORATION, decorations); + let editors = VSCode.window.visibleTextEditors; + for (let editor of editors) { + let activeUri = editor.document.uri.toString(); + if (uri===activeUri) { + //We only update highlights in the active editor for now + let highlights : Range[] = this.highlights.get(uri) || []; + let decorations = highlights.map(hl => toDecoration(hl)); + editor.setDecorations(this.DECORATION, decorations); + } } } } \ No newline at end of file