VSCode jumpiness when editing markdown and preview pane is open
Asked Answered
C

2

16

This problem comes and goes, but it's been getting unbearable as times goes on.

The environment:

I am using the latest version of VSCode (1.45.1) on a mac running OSX 10.15.4. with a minimal set of extensions (I have disabled everything I can), namely:

  • Markdown All in One 2.8.0
  • Markdown Preview Mermaid
  • Markdownlint 0.35.1

The problem:

When I am editing a Markdown document with preview alongside it, the text window jumps with the cursor location moving up the window to the point of disappearing at the top.

I am not sure exactly what triggers this behavior, but I suspect it has to do with using any sort of graphic rendering, be it MathJax, Mermaid, or a simple figure.

Online searches show similar behavior reported, and supposedly corrected, several years ago. But nothing recent which surprises me as it is maddening.

The question

Anyone has seen this behavior?

Any idea what could be triggering it?

Update:

  1. After more than a week trying to fix this, a couple hours after posting this question (and with no changes that I can think of on my part, it seems to have fixed itself). I am just waiting for the problem to come back. This is infuriating.
  2. Of course, a mere few hours afterwards the same problem came back. It seems to be some specific property of the markdown file as two different computers with different screen and window sizes started and stopped behaving exactly the same way with the same files.
  3. At the suggestion of @user8682688, who found the settings for the scroll synchronization in VSCode, I turned off synchronization from the preview window back into the editor ("markdown.preview.scrollEditorWithPreview": false) this at least removed the jumping from the the editor window making it usable again, but the preview window is still jumping all over the place which is the actual bug. Of course, I could disable the updating altogether with markdown.preview.scrollPreviewWithEditor, but that's just a work-around that removes useful functionality.
Credits answered 16/5, 2020 at 2:38 Comment(3)
I have the same issue, and I also used the less than ideal workaround of disabling scrollEditorWithPreview.Mispronounce
Got the same issue with vscode 1.62.3...Padnag
Still the same problem here, 2 years later! There are a few github issues posted, but they are all closed saying the problem is fixed...Cosset
F
15

VSCode automatically synchronizes the Markdown editor and the preview panes. Have you tried to disable the markdown.preview.scrollPreviewWithEditor and markdown.preview.scrollEditorWithPreview settings?

ref: https://code.visualstudio.com/docs/languages/markdown#_editor-and-preview-synchronization

Frijol answered 29/5, 2020 at 3:1 Comment(1)
Thanks, not ideal as you lose synchronization between the two (I only disabled markdown.preview.scrollEditorWithPreview as it's the double-dependency that causes the problem). The preview editor still jumps around all over the place (the actual bug), but at least it does not take the editor window with it.Credits
D
0

For posterity, whenever getting a weird issue like this comment out all the settings in Vscode JSON settings and then try again. I had a weird markdown file issue similar to what you are describing and I just commented out all my settings and then it worked as expected.

Delorasdelorenzo answered 3/12, 2022 at 4:32 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.