aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r--helix-term/src/commands.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index a5203352..c87ad0ca 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -2225,8 +2225,9 @@ fn append_mode(cx: &mut Context) {
}
fn file_picker(cx: &mut Context) {
- // We don't specify language markers, root will be the root of the current git repo
- let root = find_root(None, &[]).unwrap_or_else(|| PathBuf::from("./"));
+ // We don't specify language markers, root will be the root of the current
+ // git repo or the current dir if we're not in a repo
+ let root = find_root(None, &[]);
let picker = ui::file_picker(root, &cx.editor.config());
cx.push_layer(Box::new(overlayed(picker)));
}