You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Markdown Preview does not preserve scroll position #22995
Go to the preview tab again. Notice that the scrollbar is reset to top.
My suggestion is that the scroll position of Markdown preview tab should follow its corresponding raw Markdown tab's only if the raw Markdown tab is present. If it is not present, the preview tab should preserve the last scroll position.
Open a Markdown file, place cursor anywhere in file other than the top
Open the Preview (ctrl+shift+v).
More generally than above, the "Preview" tool now (unlike previously) always resets to the top of the markdown file when you open it or go to its tab and it refreshes (or you press ctrl+shift+v). It no longer goes to the current edit (cursor) location in the raw file. It is inconvenient to repeatedly scroll down to the current edit location in long files, to preview the changes.
I'm pretty sure I skipped a couple of version updates until I installed 1.11.1 today (4/9/2017), so I'm not sure when the behavior changed, but it was fairly recent, my version was not too outdated, no more than two or three updates.
For anyone seeing this problem, #24985 just added some basic logging to help investigate. The change be in the next insiders build. Once that is released, please download it and:
Set "markdown.trace": "verbose"
Reproduce the issue
Go to the output pane and share the output from the Markdown section
This should help me investigate what may be going wrong here
Matt Bierner (@mjbvz) Thanks very much for looking into this. Below is my output after setting markdown.trace to verbose in VS Code 1.12.0-insider. The first entry is when I click somewhere in the middle of the markdown document. The second is when I use the preview option (which still shows the very top of the document instead of where my cursor was in the actual markdown document).
From your log, I think there's a bug in the markdown preview where using Open Preview instead of Open Preview to Side causes the initial line not to be set. Looking into a fix
Activity
slfuqua commentedon Apr 9, 2017
Steps to Reproduce:
More generally than above, the "Preview" tool now (unlike previously) always resets to the top of the markdown file when you open it or go to its tab and it refreshes (or you press ctrl+shift+v). It no longer goes to the current edit (cursor) location in the raw file. It is inconvenient to repeatedly scroll down to the current edit location in long files, to preview the changes.
I'm pretty sure I skipped a couple of version updates until I installed 1.11.1 today (4/9/2017), so I'm not sure when the behavior changed, but it was fairly recent, my version was not too outdated, no more than two or three updates.
jdim commentedon Apr 9, 2017
Same behavior
rebornix commentedon Apr 11, 2017
Re #22279, run into this issue while following the guidance of the project.
mjbvz commentedon Apr 11, 2017
Peng Lyu (@rebornix) Can we try debugging through the issue on your machine this afternoon?
chaskim commentedon Apr 18, 2017
I have the same problem as outlined by Sherrie L. Fuqua (@slfuqua).
It worked okay in earlier versions of VS Code (I believe it worked okay in 1.10.x).
mjbvz commentedon Apr 19, 2017
For anyone seeing this problem, #24985 just added some basic logging to help investigate. The change be in the next insiders build. Once that is released, please download it and:
"markdown.trace": "verbose"MarkdownsectionThis should help me investigate what may be going wrong here
chaskim commentedon Apr 19, 2017
Matt Bierner (@mjbvz) Thanks very much for looking into this. Below is my output after setting markdown.trace to verbose in VS Code 1.12.0-insider. The first entry is when I click somewhere in the middle of the markdown document. The second is when I use the preview option (which still shows the very top of the document instead of where my cursor was in the actual markdown document).
I see that the "line" entry is zero. Maybe the issue is related to that?
mjbvz commentedon Apr 19, 2017
Thanks chaskim!
From your log, I think there's a bug in the markdown preview where using
Open Previewinstead ofOpen Preview to Sidecauses the initial line not to be set. Looking into a fixisidorn commentedon May 8, 2017
Potentially dup of #22420
Preserve Webview Scroll Position (#26426)
Preserve Webview Scroll Position (microsoft#26426)