mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-03 07:04:53 +00:00
![]() ## Summary Fixes #11651. Fixes #11851. We were double-closing a notebook document from the index, once in `textDocument/didClose` and then in the `notebookDocument/didClose` handler. The second time this happens, taking a snapshot fails. I've rewritten how we handle snapshots for closing notebooks / notebook cells so that any failure is simply logged instead of propagating upwards. This implementation works consistently even if we don't receive `textDocument/didClose` notifications for each specific cell, since they get closed (and the diagnostics get cleared) in the notebook document removal process. ## Test Plan 1. Open an untitled, unsaved notebook with the `Create: New Jupyter Notebook` command from the VS Code command palette (`Ctrl/Cmd + Shift + P`) 2. Without saving the document, close it. 3. No error popup should appear. 4. Run the debug command (`Ruff: print debug information`) to confirm that there are no open documents |
||
---|---|---|
.. | ||
edit | ||
server | ||
session | ||
edit.rs | ||
fix.rs | ||
format.rs | ||
lib.rs | ||
lint.rs | ||
message.rs | ||
server.rs | ||
session.rs | ||
trace.rs |