microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.69k stars 28.69k forks source link

Markdown preview switches to latest open markdown document #146334

Open lramos15 opened 2 years ago

lramos15 commented 2 years ago

Steps to Reproduce:

  1. Open a markdown preview
  2. Close the associated markdown file
  3. Scroll around
  4. Open the same markdown file again
  5. 🐛 Scroll position is reset.
  6. Close the markdown file
  7. Open a different markdown file
  8. 🐛 Preview changes to the new markdown file.

Maybe it's because I use the markdown previews as markdown readers but I don't expect their state to be tied to the currently open markdown file, especially because I can close the markdown file and keep viewing without issue

Priyankcoder commented 2 years ago

@lramos15 @mjbvz Hi, I'm getting the same behavior for 2nd bug mentioned in 8th point on my machine. But scroll position is not reseting as mentioned in 5th point. Can you please attach a gif or video that shows the process to reproduce that bug?

Purposed new behavior to resolve 2nd bug:

  1. On opening a new markdown file, the preview should not be updated unless a user explicity use a command to do so in the new file.

Please provide me the feedback regarding the purposed behavior and let me know if I can pick this issue.