From 7a08edc383c5efd6811e0aa203cf9e3caf457068 Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Tue, 30 Mar 2021 10:34:45 +0200 Subject: [PATCH] Fix issue in jump-to-definition on Windows. Fixes https://github.com/rescript-lang/rescript-vscode/issues/98#L345 The issue arises when the drive letter is lowercase. --- Changes.md | 4 ++++ src/rescript-editor-support/Uri2.re | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Changes.md b/Changes.md index a433438a..a2b20f7f 100644 --- a/Changes.md +++ b/Changes.md @@ -1,3 +1,7 @@ +# master +- Fix issue in jump-to-definition on Windows. (See https://github.com/rescript-lang/rescript-vscode/issues/98) where the wrong URI was generated. + + ## Release 1.0.6 of rescript-vscode This [commit](https://github.com/rescript-lang/rescript-editor-support/commit/03ee0d97b250474028d4fb08eac81ddb21ccb082) is vendored in [rescript-vscode 1.0.6](https://github.com/rescript-lang/rescript-vscode/releases/tag/1.0.6). diff --git a/src/rescript-editor-support/Uri2.re b/src/rescript-editor-support/Uri2.re index 97659bc1..344e3933 100644 --- a/src/rescript-editor-support/Uri2.re +++ b/src/rescript-editor-support/Uri2.re @@ -19,7 +19,7 @@ module Uri: { ++ ( Str.global_replace(Str.regexp_string("\\"), "/", path) |> Str.substitute_first( - Str.regexp("^\\([A-Z]\\):"), + Str.regexp("^\\([a-zA-Z]\\):"), text => { let name = Str.matched_group(1, text); "/" ++ String.lowercase_ascii(name) ++ "%3A";