aboutsummaryrefslogtreecommitdiff
path: root/src/server/documents.odin
diff options
context:
space:
mode:
authorDanielGavin <danielgavin5@hotmail.com>2023-04-03 22:25:55 +0200
committerDanielGavin <danielgavin5@hotmail.com>2023-04-03 22:25:55 +0200
commitbd0461b45a29f2b638252a8ff27ecdb764f1c4ec (patch)
treec9072e1baf3b1b6c59a0a03a5dea987f96dc9d0d /src/server/documents.odin
parent58606d4394eac344516513d805902367030eaf79 (diff)
File cache was using the wrong allocator - might fix the issues with semantic tokens crashing ones in a while.
Diffstat (limited to 'src/server/documents.odin')
-rw-r--r--src/server/documents.odin4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/documents.odin b/src/server/documents.odin
index 1c281c0..bbde1ca 100644
--- a/src/server/documents.odin
+++ b/src/server/documents.odin
@@ -307,6 +307,10 @@ document_close :: proc(uri_string: string) -> common.Error {
return .InvalidRequest
}
+ if document.uri.uri in file_resolve_cache.files {
+ delete_key(&file_resolve_cache.files, document.uri.uri)
+ }
+
document_free_allocator(document.allocator)
document.allocator = nil