Description
Type: Bug
Description:
When attempting to pin a new file while another file is already pinned and open in preview mode, the new file incorrectly replaces the pinned file instead of opening in the regular mode. This leads to inconvenience as the previously pinned file is lost.
Steps to Reproduce:
Open a file, for example, some-file.md.
Pin this file by clicking on the pin icon next to the file name.
Open another file, for example, another-file.md, using the "Open Preview" command.
Observe that instead of opening another-file.md in preview mode, it opens and replaces the previously pinned file some-file.md.
Expected Behavior:
When opening a file using "Open Preview" while a file is already pinned, the new file should open in preview mode without replacing the pinned file. The pinned file should remain pinned and open.
Actual Behavior:
The new file opened using "Open Preview" replaces the previously pinned file.
VS Code version: Code 1.98.2 (ddc367e, 2025-03-12T13:32:45.399Z)
OS version: Darwin x64 24.3.0
Modes: