Skip to content

Explorer does not collapse after closing file preview #140057

@septatrix

Description

@septatrix

Issue Type: Bug

  1. Create a new directory and open VSCode in it.
  2. Create a file in a subdirectory which you can open in preview mode.
    • A simple method would be to type npm i foobar in the console, create a main.js file with the content import "foobar"; and then use the "Go to Definition" feature.
  3. See that the directory structure in the explorer got expanded to show where the file is.
  4. Close the file preview.
  5. See that the treeview still is expanded.

This is especially annoying when working with large dependency structures like pythons .venv or nodes node_modules. After looking up some implementation details the whole explorer view is filled and one has to scroll down or collapse the respective directories to be able to see the usual project files.

VS Code version: Code 1.63.2 (899d46d, 2021-12-15T09:39:46.686Z)
OS version: Linux x64 5.15.6-200.fc35.x86_64
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz (4 x 3500)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 0, 1, 0
Memory (System) 23.38GB (2.39GB free)
Process Argv . --crash-reporter-id 1210ff29-5664-4392-8686-094a41832aaf
Screen Reader no
VM 0%
DESKTOP_SESSION gnome
XDG_CURRENT_DESKTOP GNOME
XDG_SESSION_DESKTOP gnome
XDG_SESSION_TYPE wayland
Extensions (29)
Extension Author (truncated) Version
better-comments aar 2.1.0
Bookmarks ale 13.2.2
vscode-sqlite ale 0.14.0
vscode-markdownlint Dav 0.45.0
vscode-eslint dba 2.2.2
gitlens eam 11.7.0
EditorConfig Edi 0.16.4
prettier-vscode esb 9.0.0
haskell has 1.8.0
vscode-drawio hed 1.6.3
latex-workshop Jam 8.23.0
language-haskell jus 3.4.0
python ms- 2021.12.1559732655
vscode-pylance ms- 2021.12.2
jupyter ms- 2021.11.1001550889
jupyter-keymap ms- 1.0.0
jupyter-renderers ms- 1.0.4
remote-ssh ms- 0.70.0
remote-ssh-edit ms- 0.70.0
cpptools ms- 1.7.1
vsliveshare ms- 1.0.5200
vetur oct 0.35.0
material-icon-theme PKi 4.11.0
platformio-ide pla 2.4.0
rust rus 0.7.8
vscodeintellicode Vis 1.2.15
vscode-icons vsc 11.8.0
markdown-all-in-one yzh 3.4.0
material-theme zhu 3.13.9

(3 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dsc:30414009
pythonvs932:30410667
vscop804cf:30404767
vs360cf:30404996
vsrem710:30416614
vscexrecpromp3c:30407761

Metadata

Metadata

Assignees

Labels

*duplicateIssue identified as a duplicate of another issue(s)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions