on master help sign in
completion: remove_follow links on filename_impl
8a4fbf6Blaž Hrastnik
helix-term/src/ui/mod.rs+2−2
@@ -381,7 +381,7 @@ pub mod completers {
381 }
381 }
382
382
383 // TODO: we could return an iter/lazy thing so it can fetch as many as it needs.
383 // TODO: we could return an iter/lazy thing so it can fetch as many as it needs.
384− fn filename_impl<F>(editor: &Editor, input: &str, filter_fn: F) -> Vec<Completion>
384+ fn filename_impl<F>(_editor: &Editor, input: &str, filter_fn: F) -> Vec<Completion>
385 where
385 where
386 F: Fn(&ignore::DirEntry) -> FileMatch,
386 F: Fn(&ignore::DirEntry) -> FileMatch,
387 {
387 {
@@ -413,7 +413,7 @@ pub mod completers {
413
413
414 let mut files: Vec<_> = WalkBuilder::new(&dir)
414 let mut files: Vec<_> = WalkBuilder::new(&dir)
415 .hidden(false)
415 .hidden(false)
416− .follow_links(editor.config().file_picker.follow_symlinks)
416+ .follow_links(false) // We're scanning over depth 1
417 .max_depth(Some(1))
417 .max_depth(Some(1))
418 .build()
418 .build()
419 .filter_map(|file| {
419 .filter_map(|file| {