diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs index 44a3720b..7e4464bc 100644 --- a/helix-term/src/ui/mod.rs +++ b/helix-term/src/ui/mod.rs @@ -85,10 +85,15 @@ pub fn file_picker(root: PathBuf) -> Picker { Err(_err) => None, }); - const MAX: usize = 8192; + let files = if root.join(".git").is_dir() { + files.collect() + } else { + const MAX: usize = 8192; + files.take(MAX).collect() + }; Picker::new( - files.take(MAX).collect(), + files, move |path: &PathBuf| { // format_fn path.strip_prefix(&root)