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
Notebook cell not saving its contents #135516
Comments
Reproduce steps: Open two VS Code instances with same folder (Stable + Insiders)
It seems that the auto reload on file change on disk triggers this, the UI is attached to a new text buffer/model, however the saving/snapshot code is using another one. |
edit fixed the steps above because that's how I could reproduce |
This is a problem with the Having these two data sources doesn't seem healthy and IMO the presence of a resolved text model should always shadow the text buffer so that there is only one source of truth |
@jrieken when we create the text model, we actually use the text buffer from the cell as the source of truth vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts Lines 266 to 271 in d209aa2
not sure how the disconnect of |
When we reload the window, we would create a notebook text model with new cell text models, and try to link alive monaco text models back to the cell models, but we didn't reuse the text buffer from them vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.ts Lines 607 to 608 in 616aea3
|
Glad we nailed it before release, good catch and thanks all for the help. |
@greazer has a repro currently that I will try to debug more tomorrow
Questions to answer
The text was updated successfully, but these errors were encountered: