You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Donn't render newline-characters as new lines in suggest details widget #99370
Create an extension providing a completion item with detail set to "void writeln(\n\tT...\n)(\n\tT args\n)"
Observe that VSCode reordered the detail string in the small view:
(changed to void writeln( ) T...)
Observe that the big detail view is missing the indentation: (doesn't work with tabs or with spaces)
On the API documentation (https://code.visualstudio.com/api/references/vscode-api#CompletionItem) it says detail is just "A human-readable string with additional information about this item", so I wouldn't expect VSCode to split it up into lines, reorder the lines and show that in the short UI.
The missing indentation part is probably a separate issue from this though.
changed the title [-]CompletionItem.detail reordered + formatted / not used as is[/-][+]Donn't render newline-characters as new lines in suggest details widget[/+]on Jun 5, 2020
I actually quite liked that the suggest details widget showed newlines, instead my issue was that the small preview had mixed up the string somehow and I mentioned in the side that the details widget showed the string correctly, but without indentation.
For complex strings I think it's actually a good idea to keep the details widget newlines and properly embrace it as a feature.
Refinement: when details (as provided by the extension) contain line breaks then we'll don't allow render-only breaks but when details are a single line we do wrap for rendering.
I found one minor issue when long symbols are used, but you could argue that I just need to resize the detail and I will do that, so I'm fine with this:
Activity
[-]CompletionItem.detail reordered + formatted / not used as is[/-][+]Donn't render newline-characters as new lines in suggest details widget[/+]jrieken commentedon Oct 5, 2020
Let's try this for October...
WebFreak001 commentedon Oct 5, 2020
I actually quite liked that the suggest details widget showed newlines, instead my issue was that the small preview had mixed up the string somehow and I mentioned in the side that the details widget showed the string correctly, but without indentation.
For complex strings I think it's actually a good idea to keep the details widget newlines and properly embrace it as a feature.
8 remaining items
keep authored line-breaks for details/type label, tweak sizing, #99370
jrieken commentedon Oct 26, 2020
I pushed a change to render line breaks as they are. No line breaks that are inserted to fit into the rendering box
jrieken commentedon Oct 26, 2020
to verify:
AbortControlleretc ppjrieken commentedon Oct 27, 2020
Daniel Imms (@Tyriar) for verification
add title attribute to details label, #99370
details wrap normal unless they contain newlines, #99370
jrieken commentedon Oct 27, 2020
Refinement: when details (as provided by the extension) contain line breaks then we'll don't allow render-only breaks but when details are a single line we do wrap for rendering.
JacksonKearl commentedon Oct 28, 2020
Spot on.

Tyriar commentedon Oct 29, 2020
The primary case I had issue with is covered now:
I found one minor issue when long symbols are used, but you could argue that I just need to resize the detail and I will do that, so I'm fine with this:
Thanks for following this up 👍
fix microsoft/vscode#99370