SchoofsKelvin / vscode-sshfs

Extension for Visual Studio Code: File system provider using SSH
GNU General Public License v3.0
543 stars 36 forks source link

Opening file from file explorer sometimes replaces tab contents instead of opening a new tab #276

Closed jnareb closed 2 years ago

jnareb commented 2 years ago

Issue Type: Bug

I use SSH FS to edit files on remote host, with which connection sometimes fail (and I guess it is relevant, because the problem began only after a first or second reconnection).

SSH FS extension is in a strange condition, where opening files from the Explorer, instead of opening a file in a new tab, it replaces a current tab.

Moreover, if I create a new empty file from the "Open Editors", and make this Untitled-1 tab current, opening new C++ file from the Workspace replaces a tab with another file.

Extension version: 1.21.0 VS Code version: Code 1.58.2 (c3f126316369cd610563c75b1b1725e0679adfb3, 2021-07-14T22:10:15.214Z) OS version: Windows_NT x64 10.0.19043 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (4 x 2712)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|15.87GB (4.68GB free)| |Process Argv|--crash-reporter-id f099b4ec-4108-499a-b723-c41ac714e692| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383cf:30185419 vspyt653:30270858 pythonvspyt602:30300191 vspor879:30202332 vspor708:30202333 vspor363:30204092 pythonvspyt639:30300192 pythontb:30283811 pythonvspyt551cf:30311713 vspre833:30321513 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 pythondataviewer:30285071 vscus158:30321503 pythonvsuse255:30340121 vscod805cf:30301675 pythonvspyt200:30340761 vscextlang:30333561 binariesv615:30325510 vsccppwt:30329788 bridge0708:30335490 ```
jnareb commented 2 years ago

Workaround: use "Open to the Side", then move tab back to the main group.

SchoofsKelvin commented 2 years ago

Is this separate from VS Code's built-in mechanic of replacing tabs for opened-but-not-interacted-with files?

The extension does nothing regarding tabs, it doesn't even try to open any new tabs. The only exceptions are opening the Settings UI and when using the remote code command (#267), and even then it is using the regular extension API. VS Code itself decides whether to replace tabs.