Repository metrics
- Stars
- (74,848 stars)
- PR merge metrics
- (平均マージ 11h 43m) (30d で 1,000 merged PRs)
説明
Does this issue occur when all extensions are disabled?: No, but I don't think the extension is at at fault. Please read the rest of the story.
- VS Code Version: 1.64.2
- OS Version: Windows_NT x64 10.0.19044
So here's what happened. I began working last week on a new pet project, a silly idea for an esoteric programming language. Before I develop an interpreter around my ideas, I thought I'd lay my ideas out in full by writing out the documentation on how the project will function once it's completed.
I'm writing out my ideas in Markdown, intended for easy reading in the GitHub repo for my project. Because GitHub is the only site I ever write Markdown for as of now, I installed an extension that restyles my Markdown preview pane to GitHub's dark mode styling: Dark Github Markdown Preview.
While writing, I noticed some strange behavior in the preview pane related to scrolling. For ease of description, I used OBS to record a video of my findings:
I'm not completely sure, but I think this may actually be a VSCode issue, not an issue with the extension. You see, when I disable this extension and return the preview pane to it's default, built-in styling, these issues disappear. When I took a look at the repo for this extension, though, it seemed to be just a .css reskin. Unless I'm a dunce and I missed something significant, there isn't really much code in this extension, and therefore the faulty scrolling would be the fault of VSCode, where the scrolling code exists.
My theory is that the scrolling code (both scrolling the preview pane when the source pane is scrolled, and scrolling the preview pane to the currently-updated spot when you type in the source pane) inside VSCode doesn't take into account the possibility that the preview pane could be restyled to different fonts, spacings, or styles. Maybe the auto-scrolling code operates based on hardcoded values for font-sizing/spacing/line-height rather than the actual size of the text as displayed, taking into account user-installed style modifications?