aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/notifications/publish_decorations.ts
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/notifications/publish_decorations.ts')
-rw-r--r--editors/code/src/notifications/publish_decorations.ts24
1 files changed, 0 insertions, 24 deletions
diff --git a/editors/code/src/notifications/publish_decorations.ts b/editors/code/src/notifications/publish_decorations.ts
deleted file mode 100644
index f23e286ad..000000000
--- a/editors/code/src/notifications/publish_decorations.ts
+++ /dev/null
@@ -1,24 +0,0 @@
1import * as vscode from 'vscode';
2
3import { Decoration } from '../highlighting';
4import { Server } from '../server';
5
6export interface PublishDecorationsParams {
7 uri: string;
8 decorations: Decoration[];
9}
10
11export function handle(params: PublishDecorationsParams) {
12 const targetEditor = vscode.window.visibleTextEditors.find(editor => {
13 const unescapedUri = unescape(editor.document.uri.toString());
14 // Unescaped URI looks like:
15 // file:///c:/Workspace/ra-test/src/main.rs
16 return unescapedUri === params.uri;
17 });
18
19 if (!Server.config.highlightingOn || !targetEditor) {
20 return;
21 }
22
23 Server.highlighter.setHighlights(targetEditor, params.decorations);
24}