diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-10-17 05:59:26 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-10-17 05:59:26 -0400 |
| commit | d58eae8b232dca30f3fc2e0a5eeee3822c673cfb (patch) | |
| tree | 3f5d04ff73fd03d06178bc96d3852e0a22868835 | |
| parent | 5ca256c325a1a122d838e095e392ca00c39a632e (diff) | |
Only check unused imports if the document is not nil on save
| -rw-r--r-- | src/server/requests.odin | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/requests.odin b/src/server/requests.odin index b42a3e3..7253063 100644 --- a/src/server/requests.odin +++ b/src/server/requests.odin @@ -1145,8 +1145,9 @@ notification_did_save :: proc( check(config.profile.checker_path[:], corrected_uri, config) document := document_get(save_params.textDocument.uri) - - check_unused_imports(document, config) + if document != nil { + check_unused_imports(document, config) + } push_diagnostics(writer) |