From 233f1dd2a850a7c8c6947c88c1ce06f7a945befd Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 30 Dec 2019 23:12:33 +0100 Subject: Privatize highlighting --- editors/code/src/notifications/index.ts | 3 --- .../code/src/notifications/publish_decorations.ts | 24 ---------------------- 2 files changed, 27 deletions(-) delete mode 100644 editors/code/src/notifications/index.ts delete mode 100644 editors/code/src/notifications/publish_decorations.ts (limited to 'editors/code/src/notifications') 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 @@ -import * as publishDecorations from './publish_decorations'; - -export { 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 @@ -import * as vscode from 'vscode'; - -import { Decoration } from '../highlighting'; -import { Server } from '../server'; - -export interface PublishDecorationsParams { - uri: string; - decorations: Decoration[]; -} - -export function handle(params: PublishDecorationsParams) { - const targetEditor = vscode.window.visibleTextEditors.find(editor => { - const unescapedUri = unescape(editor.document.uri.toString()); - // Unescaped URI looks like: - // file:///c:/Workspace/ra-test/src/main.rs - return unescapedUri === params.uri; - }); - - if (!Server.config.highlightingOn || !targetEditor) { - return; - } - - Server.highlighter.setHighlights(targetEditor, params.decorations); -} -- cgit v1.2.3