summaryrefslogtreecommitdiff
path: root/lsp.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-09 21:59:51 -0500
committerpommicket <pommicket@gmail.com>2023-01-09 22:00:23 -0500
commit7f0255cb40bb85276191ec3ddffe507e53abf2ac (patch)
tree2376d10183d4085a7e8c85bba008f8ba3516d731 /lsp.c
parentce158f26b9136b3fc831c6325ad911e3bf403a4b (diff)
fixed a bunch of windows stuff
also compile_commands.json does fix the usages problem!
Diffstat (limited to 'lsp.c')
-rw-r--r--lsp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lsp.c b/lsp.c
index b9b0398..c5aaef8 100644
--- a/lsp.c
+++ b/lsp.c
@@ -481,6 +481,12 @@ u32 lsp_document_id(LSP *lsp, const char *path) {
*value = id;
LSPDocumentData *data = arr_addp(lsp->document_data);
data->path = str_dup(path);
+ #if _WIN32
+ // file URIs use slashes: https://en.wikipedia.org/wiki/File_URI_scheme
+ for (char *p = data->path; *p; ++p)
+ if (*p == '\\')
+ *p = '/';
+ #endif
}
u32 id = *value;
SDL_UnlockMutex(lsp->document_mutex);