summaryrefslogtreecommitdiff
path: root/helix-term/src/commands.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-06-25 04:20:15 +0000
committerBlaž Hrastnik2021-06-25 04:20:15 +0000
commit503ca112ae57ebdf3ea323baf8940346204b46d2 (patch)
tree23a14b94a1bd4072721b1ce09e2adf754d1abc3f /helix-term/src/commands.rs
parent8e277ad8baf43ce0649ceb2fad96386f4276c686 (diff)
fix: jumping to location did not convert the URI correctly
thus breaking Windows
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r--helix-term/src/commands.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index d98bda74..688e653a 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -2069,9 +2069,11 @@ fn goto_impl(
offset_encoding: OffsetEncoding,
action: Action,
) {
- let id = editor
- .open(PathBuf::from(location.uri.path()), action)
- .expect("editor.open failed");
+ let path = location
+ .uri
+ .to_file_path()
+ .expect("unable to convert URI to filepath");
+ let id = editor.open(path, action).expect("editor.open failed");
let (view, doc) = current!(editor);
let definition_pos = location.range.start;
// TODO: convert inside server