From 6c8da84718921a621394444a4ed71b95dd5d602b Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 30 Oct 2020 10:19:52 +0100 Subject: [PATCH] relax white-space wrap and allow unless extension has details with newlines followed by intentation (whitespace), fixes https://github.com/microsoft/vscode/issues/109717 --- src/vs/editor/contrib/suggest/media/suggest.css | 1 + src/vs/editor/contrib/suggest/suggestWidgetDetails.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/suggest/media/suggest.css b/src/vs/editor/contrib/suggest/media/suggest.css index cfe8817c04987..29fa4575fa9f9 100644 --- a/src/vs/editor/contrib/suggest/media/suggest.css +++ b/src/vs/editor/contrib/suggest/media/suggest.css @@ -356,6 +356,7 @@ .monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type.auto-wrap { white-space: normal; + word-break: break-all; } diff --git a/src/vs/editor/contrib/suggest/suggestWidgetDetails.ts b/src/vs/editor/contrib/suggest/suggestWidgetDetails.ts index 23d0667d6ee7d..72500145f1472 100644 --- a/src/vs/editor/contrib/suggest/suggestWidgetDetails.ts +++ b/src/vs/editor/contrib/suggest/suggestWidgetDetails.ts @@ -148,7 +148,7 @@ export class SuggestDetailsWidget { this._type.textContent = cappedDetail; this._type.title = cappedDetail; dom.show(this._type); - this._type.classList.toggle('auto-wrap', !cappedDetail.includes('\n')); + this._type.classList.toggle('auto-wrap', !/\r?\n^\s+/gmi.test(cappedDetail)); } else { dom.clearNode(this._type); this._type.title = '';