From 7e45f3629326ee54a8a3e0f922ea9e60c0c89915 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 15 Apr 2020 19:02:28 -0700 Subject: [PATCH] :lipstick: --- .../contrib/parameterHints/parameterHintsWidget.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/vs/editor/contrib/parameterHints/parameterHintsWidget.ts b/src/vs/editor/contrib/parameterHints/parameterHintsWidget.ts index 19e4b2cedc8..53d0b0c27d8 100644 --- a/src/vs/editor/contrib/parameterHints/parameterHintsWidget.ts +++ b/src/vs/editor/contrib/parameterHints/parameterHintsWidget.ts @@ -208,28 +208,26 @@ export class ParameterHintsWidget extends Disposable implements IContentWidget { this.renderParameters(code, signature, activeParameterIndex); } - const activeParameter: modes.ParameterInformation | undefined = signature.parameters[activeParameterIndex]; if (activeParameter?.documentation) { const documentation = $('span.documentation'); if (typeof activeParameter.documentation === 'string') { documentation.textContent = activeParameter.documentation; } else { - const renderedContents = this.markdownRenderer.render(activeParameter.documentation); + const renderedContents = this.renderDisposeables.add(this.markdownRenderer.render(activeParameter.documentation)); dom.addClass(renderedContents.element, 'markdown-docs'); - this.renderDisposeables.add(renderedContents); documentation.appendChild(renderedContents.element); } dom.append(this.domNodes.docs, $('p', {}, documentation)); } - if (signature.documentation === undefined) { /** no op */ } - else if (typeof signature.documentation === 'string') { + if (signature.documentation === undefined) { + /** no op */ + } else if (typeof signature.documentation === 'string') { dom.append(this.domNodes.docs, $('p', {}, signature.documentation)); } else { - const renderedContents = this.markdownRenderer.render(signature.documentation); + const renderedContents = this.renderDisposeables.add(this.markdownRenderer.render(signature.documentation)); dom.addClass(renderedContents.element, 'markdown-docs'); - this.renderDisposeables.add(renderedContents); dom.append(this.domNodes.docs, renderedContents.element); } -- GitLab