Skip to content

Commit

Permalink
Remove onDidChange handlers.
Browse files Browse the repository at this point in the history
  • Loading branch information
rebornix committed Aug 25, 2017
1 parent c41af75 commit 0b95b4b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
17 changes: 0 additions & 17 deletions src/vs/editor/contrib/colorPicker/browser/colorDetector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/vs/monaco.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
/**
Expand Down

0 comments on commit 0b95b4b

Please sign in to comment.