aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/notifications
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/notifications')
-rw-r--r--editors/code/src/notifications/index.ts3
-rw-r--r--editors/code/src/notifications/publish_decorations.ts24
2 files changed, 0 insertions, 27 deletions
diff --git a/editors/code/src/notifications/index.ts b/editors/code/src/notifications/index.ts
deleted file mode 100644
index 74c4c3563..000000000
--- a/editors/code/src/notifications/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
1import * as publishDecorations from './publish_decorations';
2
3export { publishDecorations };
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}