提交 7e1e817f 编写于 作者: M Michel Kaporin

Do not reschedule hover operation when color picker is opened. Removed redundant property.

上级 b2a19549
...@@ -206,7 +206,10 @@ export class ModesContentHoverWidget extends ContentHoverWidget { ...@@ -206,7 +206,10 @@ export class ModesContentHoverWidget extends ContentHoverWidget {
// we need to recompute the displayed text // we need to recompute the displayed text
this._hoverOperation.cancel(); this._hoverOperation.cancel();
this._computer.clearResult(); this._computer.clearResult();
this._hoverOperation.start();
if (!this._colorPicker) { // TODO@Michel ensure that displayed text for other decorations is computed even if color picker is in place
this._hoverOperation.start();
}
} }
} }
......
...@@ -271,7 +271,6 @@ export class MainThreadLanguageFeatures extends MainThreadLanguageFeaturesShape ...@@ -271,7 +271,6 @@ export class MainThreadLanguageFeatures extends MainThreadLanguageFeaturesShape
const proxy = this._proxy; const proxy = this._proxy;
this._registrations[handle] = modes.ColorProviderRegistry.register(selector, <modes.ColorRangeProvider>{ this._registrations[handle] = modes.ColorProviderRegistry.register(selector, <modes.ColorRangeProvider>{
provideColorRanges: function (model, token) { provideColorRanges: function (model, token) {
const provider = this;
return wireCancellationToken(token, proxy.$provideDocumentColors(handle, model.uri)) return wireCancellationToken(token, proxy.$provideDocumentColors(handle, model.uri))
.then((colorInfos) => { .then((colorInfos) => {
return colorInfos.map(c => { return colorInfos.map(c => {
...@@ -305,8 +304,7 @@ export class MainThreadLanguageFeatures extends MainThreadLanguageFeaturesShape ...@@ -305,8 +304,7 @@ export class MainThreadLanguageFeatures extends MainThreadLanguageFeaturesShape
color, color,
format: format, format: format,
availableFormats: availableFormats, availableFormats: availableFormats,
range: c.range, range: c.range
provider: provider
}; };
}); });
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册