on master help sign in
fix: jumping to location did not convert the URI correctly

thus breaking Windows

commit503ca112ae57ebdf3ea323baf8940346204b46d2 authorBlaž Hrastnik <blaz@mxxn.io> dateFri 25 Jun 2021, 13:20 (5 years ago) parent8e277ad
1 file changed+5−3
helix-term/src/commands.rs+5−3
helix-term/src/commands.rs+5−3
@@ -2069,9 +2069,11 @@ fn goto_impl(
20692069 offset_encoding: OffsetEncoding,
20702070 action: Action,
20712071 ) {
2072− let id = editor
2073− .open(PathBuf::from(location.uri.path()), action)
2074− .expect("editor.open failed");
2072+ let path = location
2073+ .uri
2074+ .to_file_path()
2075+ .expect("unable to convert URI to filepath");
2076+ let id = editor.open(path, action).expect("editor.open failed");
20752077 let (view, doc) = current!(editor);
20762078 let definition_pos = location.range.start;
20772079 // TODO: convert inside server