diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index 577af30bea5fe..0fc6559fdf1c8 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -121,6 +121,7 @@ .monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close { background-image: url('./close.svg'); float: right; + margin-right: 5px; } .monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore { @@ -242,10 +243,10 @@ opacity: 0.7; word-break: break-all; margin: 0; + padding: 4px 0 4px 5px; } -.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs, -.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header { +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs { margin: 0; padding: 4px 5px; } diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 386980d3288a0..7bec683cacf88 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -243,9 +243,16 @@ class SuggestionDetails { return; } removeClass(this.el, 'no-docs'); - this.type.innerText = item.suggestion.detail || ''; this.docs.textContent = item.suggestion.documentation; + if (item.suggestion.detail) { + this.type.innerText = item.suggestion.detail; + show(this.type); + } else { + this.type.innerText = ''; + hide(this.type); + } + this.el.style.height = this.header.offsetHeight + this.docs.offsetHeight + 'px'; this.close.onmousedown = e => {