-
Notifications
You must be signed in to change notification settings - Fork 28.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Donn't render newline-characters as new lines in suggest details widget #99370
Comments
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. |
Yeah, it will always do that because it needs to wrap lines because of spacing and to honour the actual line breaks. That's why it is always a mess |
why was the string |
Reopen for discussion |
I was sent here from this comment: #29126 (comment) but I'm not sure what to say. It doesn't seem like anyone here wanted newlines removed from the detailed view, so let's just not do that. I don't personally care about the small view, but I agree with the OP that it's weird if |
I pushed a change to render line breaks as they are. No line breaks that are inserted to fit into the rendering box |
to verify:
|
@Tyriar for verification |
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. |
Steps to Reproduce:
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:
![reordered](https://user-images.githubusercontent.com/2035977/83759569-0778dd00-a674-11ea-8a5e-ecde1e28803b.png)
(changed to
void writeln( ) T...
)Observe that the big detail view is missing the indentation: (doesn't work with tabs or with spaces)
![missing indentation](https://user-images.githubusercontent.com/2035977/83759699-3db65c80-a674-11ea-839b-3b687370f35c.png)
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.
The text was updated successfully, but these errors were encountered: