on master help sign in
fix: jumping to location did not convert the URI correctly
503ca11Blaž Hrastnik
helix-term/src/commands.rs+5−3
@@ -2069,9 +2069,11 @@ fn goto_impl(
2069 offset_encoding: OffsetEncoding,
2069 offset_encoding: OffsetEncoding,
2070 action: Action,
2070 action: Action,
2071 ) {
2071 ) {
2072− let id = editor
2072+ let path = location
2073− .open(PathBuf::from(location.uri.path()), action)
2073+ .uri
2074+ .to_file_path()
2075+ .expect("unable to convert URI to filepath");
2074− .expect("editor.open failed");
2076+ let id = editor.open(path, action).expect("editor.open failed");
2075 let (view, doc) = current!(editor);
2077 let (view, doc) = current!(editor);
2076 let definition_pos = location.range.start;
2078 let definition_pos = location.range.start;
2077 // TODO: convert inside server
2079 // TODO: convert inside server