提交 0b95b4bc 编写于 作者: R rebornix 提交者: Peng Lyu

Remove onDidChange handlers.

上级 c41af75f
......@@ -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);
......
......@@ -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;
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册