aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorAlexis Mousset2021-12-31 08:06:54 +0000
committerGitHub2021-12-31 08:06:54 +0000
commit8a019b423f5d51bcfc107da9cb50aa90eacff19d (patch)
tree2f5dfede14f1566ecafc5651767f9e2306f81c53 /helix-term
parent8fda87af2bb0625c502a23ddbd78a7447ada7bcb (diff)
Detect workspace root using language markers (#1370)
* Detect workspace root using language markers * Avoid allocating root_markers * Update helix-core/src/lib.rs Co-authored-by: Blaž Hrastnik <blaz@mxxn.io> * Update helix-core/src/lib.rs Co-authored-by: Kirawi <67773714+kirawi@users.noreply.github.com> Co-authored-by: Blaž Hrastnik <blaz@mxxn.io> Co-authored-by: Kirawi <67773714+kirawi@users.noreply.github.com>
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/commands.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 6259ecb2..ed728115 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -3154,7 +3154,8 @@ fn command_mode(cx: &mut Context) {
}
fn file_picker(cx: &mut Context) {
- 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
+ let root = find_root(None, &[]).unwrap_or_else(|| PathBuf::from("./"));
let picker = ui::file_picker(root, &cx.editor.config);
cx.push_layer(Box::new(picker));
}