@@ -1160,6 +1160,10 @@ fn goto_file_impl(cx: &mut Context, action: Action) {
11601160 let (view, doc) = current_ref!(cx.editor);
11611161 let text = doc.text();
11621162 let selections = doc.selection(view.id);
1163+ let rel_path = doc
1164+ .relative_path()
1165+ .map(|path| path.parent().unwrap().to_path_buf())
1166+ .unwrap_or_default();
11631167 let mut paths: Vec<_> = selections
11641168 .iter()
11651169 .map(|r| text.slice(r.from()..r.to()).to_string())
@@ -1190,7 +1194,7 @@ fn goto_file_impl(cx: &mut Context, action: Action) {
11901194 for sel in paths {
11911195 let p = sel.trim();
11921196 if !p.is_empty() {
1193− let path = Path::new(p);
1197+ let path = &rel_path.join(p);
11941198 if path.is_dir() {
11951199 let picker = ui::file_picker(path.into(), &cx.editor.config());
11961200 cx.push_layer(Box::new(overlaid(picker)));