Markdown preview does not toggle as expected in tabs
- VSCode Version: 1.3.0-insider (commit de66522, 2016-06-24)
- OS Version: Win10
Steps to Reproduce:
- Use 'code-insiders .' to open a repo.
- Click an md file to open it. Type some text into the file.
- Click another md file. It opens in a new tab.
- CTRL+SHIFT+V to preview the second file.
- Three tabs are now open, two raw md and the one with a preview of the second md.
- Now click tab 1.
- Now click tab 3.
- CTRL+SHIFT+V.
Expected: we go back to tab 2, because that is the raw md for the file previewed in tab 3. Actual: we go back to tab 1, which is raw md for a completely different file. @gregvanl this is the issue we discussed.
It looks as if this action is simply going back 1 in history? That is not really what should happen if you want to go back to source.
Yes, we go one back in history. There is no API for extensions at the moment to get access to the editor showing an html preview. Although this behavior is wrong in some cases, we at least support the switching back and forth between source and preview.
@kieferrm going back to the source should just be a call to opening the editor with the path of the markdown file, no?
@bpasero When the command is executed, the command can not find out for which editor it has been called. The extension API returns all active text editors but the preview editor is not one of them.
Oh ok, that is indeed a problem...
I believe this is the same problem as #16298. A fix was checked in and should be available in the next insiders build