diff options
author | Philipp Mildenberger | 2022-10-18 17:28:16 +0000 |
---|---|---|
committer | GitHub | 2022-10-18 17:28:16 +0000 |
commit | d17ffc47f008821e1b4ab04cd85d019ed8dc6fb9 (patch) | |
tree | 64dff73e13c0b26bd973654814c3a2674444677f /helix-term/src | |
parent | fee5db161b67316f29254f29ce5eea3044ebfdac (diff) |
Use the same `WalkBuilder` configuration for the global search file picker as the default file picker (#4334)
Skip searching .git in global search, similar to how file picker skips listing files in .git.
Diffstat (limited to 'helix-term/src')
-rw-r--r-- | helix-term/src/commands.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index d5fc1ad9..318dd035 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -1865,10 +1865,15 @@ fn global_search(cx: &mut Context) { .hidden(file_picker_config.hidden) .parents(file_picker_config.parents) .ignore(file_picker_config.ignore) + .follow_links(file_picker_config.follow_symlinks) .git_ignore(file_picker_config.git_ignore) .git_global(file_picker_config.git_global) .git_exclude(file_picker_config.git_exclude) .max_depth(file_picker_config.max_depth) + // We always want to ignore the .git directory, otherwise if + // `ignore` is turned off above, we end up with a lot of noise + // in our picker. + .filter_entry(|entry| entry.file_name() != ".git") .build_parallel() .run(|| { let mut searcher = searcher.clone(); |