make sure to clear decorations, https://github.com/microsoft/vscode/issues/16221

上级 c7ba575b
......@@ -105,15 +105,14 @@ export class InlayHintsController implements IEditorContribution {
private _update(): void {
this._sessionDisposables.clear();
this._removeAllDecorations();
if (!this._editor.getOption(EditorOption.inlayHints).enabled) {
this._removeAllDecorations();
return;
}
const model = this._editor.getModel();
if (!model || !InlayHintsProviderRegistry.has(model)) {
this._removeAllDecorations();
return;
}
......@@ -284,6 +283,7 @@ export class InlayHintsController implements IEditorContribution {
for (let obj of this._decorations.values()) {
this._codeEditorService.removeDecorationType(obj.decorationTypeId);
}
this._decorations.clear();
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册