Open jpstotz opened 10 months ago
I tried reproducing this issue with the latest stable release using following configuration.
Version: 1.91.1
Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729
Date: 2024-07-09T22:07:46.768Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Darwin arm64 23.5.0
And I couldn't reproduced the issue. Steps I followed to reproduce are as follows:
code
command.https://github.com/user-attachments/assets/bc8607ae-a34c-4960-b5f0-9bd1cfa55240
Just retried it on a different Windows 11 system and the behavior is mostly as described in my initial post: md file is opened only in editor view.
The strange part is that it is non-deterministic. If the folder the md file is located in is not a trusted path I am getting in 90% of all cases the pure edit view. And in about 10% the full-screen MD preview as shown in @manav014 video pops up.
If I add the folder to the list of trusted folders then then it works similar just in 90% of all cases the vertical split view is shown with left the editor and right the preview. And in 10% of all cases only the full-screen preview is shown.
Version: 1.91.1 (system setup)
Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729
Date: 2024-07-09T22:06:49.809Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22631
Does this issue occur when all extensions are disabled?: Yes
I read various topics on how to achieve that Markdown files are automatically displayed as preview (e.g. #2766, https://stackoverflow.com/a/63541437/150978).
The only partial working solution was adding in setting.json
However this only works if VS code is already running. If no VS code instance is running and you execute
code C:\<somepath>\test.md
then the md file is opened in edit view and not preview mode.Steps to Reproduce:
C:\temp\test.md
code C:\temp\test.md
If you repeat the steps but in step 3 do not close all VS code instances, but have one instance running in step 5 correctly the preview will be displayed.
Why does it make a difference if a VS code instance is already running or not? It should not make a diference, so the current behavior is not deterministic which in my opinion means it is a bug.