Skip to content

Commit

Permalink
Fixes #27876
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed Jun 2, 2017
1 parent df1034a commit af2752d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/vs/editor/contrib/suggest/browser/media/suggest.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
}
Expand Down
9 changes: 8 additions & 1 deletion src/vs/editor/contrib/suggest/browser/suggestWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit af2752d

Please sign in to comment.