From 9c0118241abb62492cd7b3a0c92dc4d771bf59d7 Mon Sep 17 00:00:00 2001 From: rebornix Date: Thu, 24 Aug 2017 22:03:23 -0700 Subject: [PATCH] Remove onDidChange handlers. --- .../colorPicker/browser/colorDetector.ts | 17 ----------------- src/vs/monaco.d.ts | 2 +- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/vs/editor/contrib/colorPicker/browser/colorDetector.ts b/src/vs/editor/contrib/colorPicker/browser/colorDetector.ts index afa12ad7e38b1..95551219ade20 100644 --- a/src/vs/editor/contrib/colorPicker/browser/colorDetector.ts +++ b/src/vs/editor/contrib/colorPicker/browser/colorDetector.ts @@ -114,23 +114,6 @@ export class ColorDetector implements IEditorContribution { return; } - for (const provider of ColorProviderRegistry.all(model)) { - if (typeof provider.onDidChange === 'function') { - let registration = provider.onDidChange(() => { - if (this._timeoutPromise) { - this._timeoutPromise.cancel(); - this._timeoutPromise = null; - } - if (this._computePromise) { - this._computePromise.cancel(); - this._computePromise = null; - } - this.beginCompute(); - }); - this._localToDispose.push(registration); - } - } - this._localToDispose.push(this._editor.onDidChangeModelContent((e) => { if (!this._timeoutPromise) { this._timeoutPromise = TPromise.timeout(ColorDetector.RECOMPUTE_TIME); diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 4637b59fab82a..5b3bb11cbe4d5 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -2890,7 +2890,7 @@ declare module monaco.editor { */ links?: boolean; /** - * Enable inline color decorators rendering. + * Enable inline color decorators and color picker rendering. */ colorDecorators?: boolean; /**