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
A second instance of a notebook is opened when debugging with two editor groups #133761
Comments
Simpler repo without debugging.
|
This is probably a duplicate of #131619 Here is what happens:
Our weak hack does not work in this case because a cell URI is opened: vscode/src/vs/workbench/services/editor/common/editorGroupFinder.ts Lines 201 to 208 in 34a321e
We have to stop calling |
This sounds like an easy enough fix then. The notebook knows how to translate a cell URI into the notebook URI. That's what it should use to determine the group |
Yeah it is a workaround if it is possible for a typed notebook input to know the cell it contains, would have to go somewhere here: vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.ts Lines 285 to 287 in aaa8e4d
|
So |
I don't think there's any consequences as you effectively want each cell to be considered the same input as the parent notebook. |
If you say so... not gonna touch it for September though |
@roblourens do we still want to change the behavior now or we do it early next week? Pushing to Nov first. |
I guess next month |
Reopening because fix was reverted |
@bpasero Talked with @rebornix a bit and matches cannot match for cell uris in this case as they actually want to create and resolve a new editor input which we do not do if the active editor matches the passed in one as it is normally unnecessary work. I was wondering if they should add special logic here vscode/src/vs/workbench/services/editor/common/editorGroupFinder.ts Lines 196 to 211 in 34a321e
|
Would #131619 address this too? |
@bpasero I think so as the cell uri is finding the incorrect target group. If the editor input created was opened in the correct group it would simply reveal the notebook and scroll it as expected. |
I don't understand what has to be done here. Any change a year later? |
@roblourens I don't believe we will be able to fix this until #131619 is addressed |
Why is that one related? For future reference, here are my notes from our call a couple weeks ago
|
Those notes are for the untitled issue this is for something else. The issue here is that the Cell URI doesn't match the notebook URI in the matches call so we improperly select the second group and then it resolves to the exact same notebook causing two to be opened. The reason we have to call this matches before resolution is complete and not after is due to webviews needing to know what group they belong to. Ideally an editor input is group agnostic which is why we hope @mjbvz can eventually resolve #131619 as there are some issues that just cannot be fixed in a proper manner without it, |
Oops, thanks. #166161 |
We just call openEditor and it should reveal the cell in the editor where it's already open. But I think that we can't do this correctly for notebook cells. Where is the code that checks whether the editor is already open?
The text was updated successfully, but these errors were encountered: