-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Horizontal scrolling occurs despite word wrap enabled with GitLens decorations #76458
Comments
(Experimental duplicate detection) |
Still occurs after updating to latest stable release:
|
I have had to abandon vscode for writing markdown because of this so really hope to see a fix soon! |
Please fix this bug already as I personally have been experiencing this for many months now, well before this ticket was created. With word wrap on it should never have a horizontal scroll bar. Sometimes it works, and then you add some code, and then it's broken until you mess around with word wrap on/off again. Sometimes just saving the document causes the horizontal scroll bar to show up. It even happens with the editor in full width with the left drawer closed. There is plenty of space in the code and it doesn't extend the full width, yet it still has the horizontal scroll bar. This is extremely annoying, especially when working on a laptop and scrolling with the track pad. The other ticket referenced by vscodebot is not applicable. |
I cannot easily reproduce this. Does this reproduce when using a monospace font and when disabling all extensions? Here I am trying with this file: https://github.com/microsoft/vscode/blob/master/README.md |
It doesn't happen on window resize but when
I think it might be gitlens. If you look at @sandersaares image, gitlens adds inline text to indicate commits e.g. in the first paragraph you can see light grey text saying You can see how that spills over the page width but isn't real text so doesn't break across lines. I think that might be causing the issue. |
I can confirm that disabling I don't know if the wrapping bug from that annotation is a VSCode or a GitLens responsibility. |
Currently, text decorations such as those contributed by GitLens are not taken into account when computing wrapping points. The text decorations are rendered after the wrapping points have been established and then the horizontal scrollbar is expanded in order to be able to see them. |
That's not what is happening. The horizontal scrollbar is not increased sufficiently to read the annotation. In fact I'm not sure that the annotation needs to even cross the page width for this scrolling issue to occur. The amount of extra horizontal scroll created is only a single character. This doesn't make annotations visible but it does making typing infuriating because the view continuously rescrolls itself as you write each line and it the resting point is scrolled to the rhs which cuts off the start of all lines meaning you can't properly read what you are typing. If I was guessing... I would suspect there might be some type of anchor point for the annotation that is changing the rendered width (not the actual annotation) making the content larger than the actual scroll container causing the scrollbar to appear. |
Let's track in #32856 |
Issue Type: Bug
I pressed the "end" key on my keyboard and was surprised to see the viewport scroll horizontally, as I have word wrap enabled. I do not think I have changed anything in the VSCode configuration recently. Presumably this is a regression in a recent VSCode version, as I have not encountered it before (working on the same files on the same PC).
Screenshot of horizontally scrolled viewport after pressing End key on my keyboard:
Expected behavior: viewport never scrolls horziontally when word wrap is enabled.
Using font Consolas, so should not be related to proportional fonts.
VS Code version: Code 1.35.1 (c7d83e5, 2019-06-12T14:30:02.622Z)
OS version: Windows_NT x64 10.0.18362
System Info
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Extensions (6)
The text was updated successfully, but these errors were encountered: