Skip to content

Commit 24147e2

Browse files
committed
"Normalize" URI comparison between LSP/Code workspace edits.
- On Windows, URI conversion (LSP -> Code) encodes certain characters (eg. ':') so that simple comparison will fail. Ensure URIs from the LSP get normalized as well Signed-off-by: Roland Grunberg <[email protected]>
1 parent 0149fc7 commit 24147e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/extension.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ export async function activate(context: ExtensionContext): Promise<ExtensionAPI>
235235
extractInterfaceSupport: true,
236236
advancedUpgradeGradleSupport: true,
237237
executeClientCommandSupport: true,
238-
snippetEditSupport: false,
238+
snippetEditSupport: true,
239239
},
240240
triggerFiles,
241241
},
@@ -321,7 +321,7 @@ export async function activate(context: ExtensionContext): Promise<ExtensionAPI>
321321
if ("textDocument" in docChange) {
322322
for (const edit of docChange.edits) {
323323
if ("snippet" in edit) {
324-
documentUris.push(docChange.textDocument.uri);
324+
documentUris.push(Uri.parse(docChange.textDocument.uri).toString());
325325
snippetEdits.push(new SnippetTextEdit(client.protocol2CodeConverter.asRange((edit as any).range), new SnippetString((edit as any).snippet.value)));
326326
}
327327
}

0 commit comments

Comments
 (0)