-
Notifications
You must be signed in to change notification settings - Fork 33.3k
Fix failure of revealing webview with viewColumn which does not exist #87832
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
base: main
Are you sure you want to change the base?
Conversation
8191d3f
to
4e444a1
Compare
4e444a1
to
a8ef4b4
Compare
@@ -869,6 +869,8 @@ export class DelegatingEditorService implements IEditorService { | |||
|
|||
createInput(input: IResourceEditor): IEditorInput { return this.editorService.createInput(input); } | |||
|
|||
findTargetGroup(input: IEditorInput, options?: IEditorOptions, group?: OpenInEditorGroup): IEditorGroup { return this.editorService.findTargetGroup(input, options, group); } |
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.
@bpasero Can you please take a look at how this change exposes findTargetGroup
. Is there a better way to accomplish this?
@mjbvz how is |
Any updates on this? |
Currently,
create a webview
andreveal a webview
's behavior is not consistent, when aviewColumn
option is provided, but that column(group) does not exist:SIDE_GROUP
will open the webview on the active group's sideSIDE_GROUP
will do nothing (revealed on the webview's current group)The root cause of such inconsistency is in that
createWebview
forward the viewColumn(group) information toeditorService.openEditor
, which will be handled byeditorService.findTargetGroup
.However,
revealWebview
gets hands dirty to find the target group by itself, and some important logic is missing, e.g. handling ofSIDE_GROUP
. So when passingviewColumn
to be 1 (start from 0) when there's only 1 column, it will be revealed to column 0 instead of 1.This PR makes
editorService.findTargetGroup
public, and foward the group number to it to reuse its logic, and keep the behavior ofrevealing
andcreating
consistent.This PR fixes #71608.