-
Notifications
You must be signed in to change notification settings - Fork 33
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
Remove Unnecessary Horizontal Scroll with Word Wrap #56
Comments
Actually, would it be possible to completely disable the scroll like the |
I can confirm that the To be clear, the change would be to this code here: vscode-error-lens/src/decorations.ts Lines 214 to 220 in 4af019f
Diff: const decInstanceRenderOptions: vscode.DecorationInstanceRenderOptions = {
...decorationRenderOptions,
after: {
...decorationRenderOptions.after || {},
+ textDecoration: 'none;position: absolute;',
contentText: truncateString(messagePrefix + diagnostic.message),
},
}; Maybe a setting for this? |
From the next version (not sure when it will be published yet): "errorLens.scrollbarHackEnabled": true, |
Great, thanks! |
It's not working. |
@Tizoner If you are using my extension (not the one that was forked) and on the latest version 3.2.4 it should work. |
Any more details? What's not working? A |
Do you have other extensions that create inline decorations (insert text)? This hack only prevents showing scrollbar from this extension, not all extensions. |
No, I don't have other extensions that create inline decorations. |
Well, I have no idea why it doesn't work. You are welcome to investigate. |
@Tizoner hmm, strange. What version of VS Code? Still working for me with Maybe try disabling all other extensions? |
@Tizoner looks pretty much the same as my version (except you're on Windows - I guess this is not an issue though). I guess you've additionally already tried:
What are the settings when you ctrl-shift-P and select "Preferences: Open Settings (JSON)"? I'm guessing you have word wrap enabled...? Can you record a gif of the behavior (eg. with ScreenToGif) and upload it here? |
When the error lens first appears, it creates a horizontal scroll, also if the user has word wrap set.
This problem alone is annoying, but potentially not currently fixable (I'm not sure if there are APIs for this in VS Code). I guess it's also tracked in #12 and microsoft/vscode#32856.
However, after the error lens is gone, it would be nice to at least remove the scrollbar again. If you look carefully in the gif above, changing tabs triggers this.
Can you think of any way to trigger a re-layout to remove the scrollbar again?
The text was updated successfully, but these errors were encountered: