Otherwise closing and re-opening a file will stop it from updating. There is a chance that a file is modified while it was closed, but I don't think there's a way to handle this (since we don't get proper edits). Fixes #5878
When a document is closed, isClosed is set to true and re-opening can return a new `TextDocument` instance. Although no tests failed with the previous code, I suspect that's because VS Code only cleans up closed TextDocuments periodically and we don't have a way to force it ๐
DanTup deleted the persist-test-trackers branch
January 21, 2026 11:47