aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/notifications
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-12-30 22:12:33 +0000
committerAleksey Kladov <[email protected]>2019-12-30 22:17:56 +0000
commit233f1dd2a850a7c8c6947c88c1ce06f7a945befd (patch)
tree0e6c920b9bb1955de444dc360072b2256060d89b /editors/code/src/notifications
parentcdd7118cbf23e21c376092b3b2734407004b8dbf (diff)
Privatize highlighting
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}