When viewing a file-with-comments under the Commits view, the "padding" in the diff view becomes dislocated
Issue Type: Bug
When I open a file in the "Commits" section of the sidebar, and that file has PR-comments created on the GitHub website (see #2793, #3266), the "padding" inserted into the 'before' section of the diff doesn't align with the actual place that the PR-comment exists:
Extension version: 0.41.2022040609 VS Code version: Code 1.66.2 (dfd34e8260c270da74b5c2d86d61aee4b6d56977, 2022-04-11T07:47:29.396Z) OS version: Darwin arm64 21.4.0 Restricted Mode: No Remote OS version: Linux x64 5.8.0-0.bpo.2-amd64
System Info
| Item | Value |
|---|---|
| CPUs | Apple M1 Pro (10 x 24) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled |
| Load (avg) | 6, 5, 5 |
| Memory (System) | 16.00GB (0.08GB free) |
| Process Argv | --crash-reporter-id ddb5da65-4654-412e-9dc3-738998ade011 --crash-reporter-id ddb5da65-4654-412e-9dc3-738998ade011 |
| Screen Reader | no |
| VM | 0% |
| Item | Value |
|---|---|
| Remote | SSH: febox3 |
| OS | Linux x64 5.8.0-0.bpo.2-amd64 |
| CPUs | AMD EPYC 7413 24-Core Processor (48 x 2571) |
| Memory (System) | 502.99GB (16.13GB free) |
| VM | 0% |
Can you point out where the comment is supposed to be?
Ah, my OP may have been unclear: the comment (on the right side) is, indeed, in the right place. However, the existence of the comment on the right side necessitates padding on the left side, so that everything stays aligned.
That padding is created, but it's created at the wrong location — notice the hashed, greyed-out emptiness on the left side? That's supposed to start after line 169, so it's lined-up with the location of the PR-comment on the right side.
This is also noticable by the line-numbers: Lines 187 match up on both sides, as do lines 169; but everything in-between is disordered, because of the above-described padding-dislocation.
Make more sense? (=
Yes, thanks for the walkthrough of what you expect. I see why it could be confusing, but it's actually by design as we don't line up line number exactly in the diff view in VS Code. Can you try minimizing the comment and seeing if the line numbers match up in the same way?