-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes for 58176: Middle clicking files in breadcrumbs explorer opens … #59797
Conversation
…as preview Added a variable to detect the middle click and pass the pinned option when this is true
This is a PR for the following issue: #58176. It's my first attempt and I would love to hear any feedback on if you felt there was a better way to implement this. |
@@ -325,7 +325,7 @@ export class BreadcrumbsControl { | |||
editorViewState = undefined; | |||
} | |||
this._contextViewService.hideContextView(this); | |||
this._revealInEditor(event, data.target, this._getEditorGroup(data.payload && data.payload.originalEvent)); | |||
this._revealInEditor(event, data.target, this._getEditorGroup(data.payload && data.payload.originalEvent), data.payload.originalEvent.middleButton); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data.payload
might be undefined and will explode now
@@ -408,11 +408,11 @@ export class BreadcrumbsControl { | |||
this._ckBreadcrumbsActive.set(value); | |||
} | |||
|
|||
private _revealInEditor(event: IBreadcrumbsItemEvent, element: any, group: SIDE_GROUP_TYPE | ACTIVE_GROUP_TYPE): void { | |||
private _revealInEditor(event: IBreadcrumbsItemEvent, element: any, group: SIDE_GROUP_TYPE | ACTIVE_GROUP_TYPE, middleClick: boolean = false): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd call it pinned
instead of middleClick
Thanks for the feedback @jrieken. Let me know if these changes cover what you need. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thanks |
…as preview
Added a variable to detect the middle click and pass the pinned option when this is true