Skip to content

Commit

Permalink
completion: remove_follow links on filename_impl
Browse files Browse the repository at this point in the history
We don't need to follow links since we're only scanning the current
directory level (non-recursive).
  • Loading branch information
archseer committed Aug 30, 2022
1 parent d2cec25 commit 8a4fbf6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helix-term/src/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ pub mod completers {
}

// TODO: we could return an iter/lazy thing so it can fetch as many as it needs.
fn filename_impl<F>(editor: &Editor, input: &str, filter_fn: F) -> Vec<Completion>
fn filename_impl<F>(_editor: &Editor, input: &str, filter_fn: F) -> Vec<Completion>
where
F: Fn(&ignore::DirEntry) -> FileMatch,
{
Expand Down Expand Up @@ -413,7 +413,7 @@ pub mod completers {

let mut files: Vec<_> = WalkBuilder::new(&dir)
.hidden(false)
.follow_links(editor.config().file_picker.follow_symlinks)
.follow_links(false) // We're scanning over depth 1
.max_depth(Some(1))
.build()
.filter_map(|file| {
Expand Down

0 comments on commit 8a4fbf6

Please sign in to comment.