diff options
author | pommicket <pommicket@gmail.com> | 2023-01-08 09:45:58 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-01-08 09:45:58 -0500 |
commit | 2d2922637d08bb156cfdcbaaba00a974e6e7a8cf (patch) | |
tree | 09fe8a64402245bb3618595f3a10a2e6bbafe22e /lsp.c | |
parent | 498b670de076909452c0fd6bc4629aca8974d9f7 (diff) |
make 0 not a valid document ID
Diffstat (limited to 'lsp.c')
-rw-r--r-- | lsp.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -523,6 +523,11 @@ LSP *lsp_create(const char *root_dir, const char *command, const char *configura lsp->quit_sem = SDL_CreateSemaphore(0); lsp->error_mutex = SDL_CreateMutex(); lsp->messages_mutex = SDL_CreateMutex(); + + // document ID 0 is reserved + LSPDocumentID zero_id = lsp_document_id(lsp, ""); + assert(zero_id == 0); + arr_add(lsp->workspace_folders, lsp_document_id(lsp, root_dir)); lsp->workspace_folders_mutex = SDL_CreateMutex(); |