diff --git a/CHANGELOG.md b/CHANGELOG.md index a219a86..cabe6ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - disable autocompletion for hex digits - no more crashes on recovered parse result - correct handling of using '=' sign in expressions +- work with untitled (unsaved) documents ## [1.3.1] - 2023-07-11 diff --git a/server/src/localFiles.ts b/server/src/localFiles.ts index 0024f46..38ca0ea 100644 --- a/server/src/localFiles.ts +++ b/server/src/localFiles.ts @@ -38,5 +38,8 @@ export function getFolder(uri: string): string { } export function unifyUri(uri: string): string { - return URI.file(URI.parse(uri).fsPath).toString(false); + const parsedUri = URI.parse(uri); + if (parsedUri.scheme === 'file') + return URI.file(parsedUri.fsPath).toString(false); + return uri; }