Vscode: Middle clicking files in breadcrumbs explorer opens as preview

Created on 7 Sep 2018  路  15Comments  路  Source: microsoft/vscode


  • VSCode Version: 1.27.1
  • OS Version: Windows 10 Pro

As of 1.27.1 "it is possible to use the middle mouse click in the Explorer view to open a file in a new editor". This should also be the case in the breadcrumbs explorer.

2018-09-07_11-36-36

Steps to Reproduce:

  1. Make sure breadcrumbs.enabled is set to true
  2. Open a file
  3. Open a file in the breadcrumbs explorer with middle mouse click
  4. File is opened in preview mode


Does this issue occur when all extensions are disabled?: Yes

breadcrumbs feature-request good first issue help wanted release-notes verification-needed verified

Most helpful comment

fixed via #59797

All 15 comments

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

This is the case with middle clicking files from the Source Control tab as well. Middle click behavior should be consistent across all methods of opening files

Unfortunately too little code sharing here...

If I recall correctly, there is a setting to enable/disable preview mode. Should we split the setting into three settings, one for each scenerio?

@Hindol To me, no. I would say it's the same feature, so only one option should be necessary. If we don't have to clog up the settings, the why do?

Middle clicking should always open in non-preview mode, so enabling/disabling preview mode itself should have no bearing on middle click's functionality

Should we split the setting into three settings, one for each scenerio?

Just one setting, so re-using the existing setting, should be enough.

I just checked. There are two settings related to preview.

  1. Enable preview, and,
  2. Enable preview from quick open.

I think having a third option Enable preview from breadcrumbs explorer makes it consistent. @scriptcoded @jrieken

This is in addition to what @haddigan has mentioned, i.e. middle click always opens non-preview editor.

@jrieken is this something that is open for me to work on?

Of course it is! Check this: https://github.com/Microsoft/vscode/blob/141f055452864ff34898c07e159210551bd4c207/src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts#L322-L326

That the handler that runs when something in the picker has been selected. The data argument has a payload property which eventually gets you to the actual event that has triggered this. Extract the middle click data from there and feed it into the _revealInEditor - it will be the pinned option when calling openEditor.

@jrieken Thanks! I'll try to have something for you soon.

Is this still open to be taken up? I can try whatever you suggested @jrieken . If @Moniarchy has not started on this already?

Hey @Shobhit1 this is still something I've been working on.

Awesome. Good luck. @Moniarchy

fixed via #59797

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shanalikhan picture shanalikhan  路  3Comments

sirius1024 picture sirius1024  路  3Comments

trstringer picture trstringer  路  3Comments

borekb picture borekb  路  3Comments

DovydasNavickas picture DovydasNavickas  路  3Comments