Skip to content

Commit d17ffc4

Browse files
authored
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.
1 parent fee5db1 commit d17ffc4

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

helix-term/src/commands.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1865,10 +1865,15 @@ fn global_search(cx: &mut Context) {
18651865
.hidden(file_picker_config.hidden)
18661866
.parents(file_picker_config.parents)
18671867
.ignore(file_picker_config.ignore)
1868+
.follow_links(file_picker_config.follow_symlinks)
18681869
.git_ignore(file_picker_config.git_ignore)
18691870
.git_global(file_picker_config.git_global)
18701871
.git_exclude(file_picker_config.git_exclude)
18711872
.max_depth(file_picker_config.max_depth)
1873+
// We always want to ignore the .git directory, otherwise if
1874+
// `ignore` is turned off above, we end up with a lot of noise
1875+
// in our picker.
1876+
.filter_entry(|entry| entry.file_name() != ".git")
18721877
.build_parallel()
18731878
.run(|| {
18741879
let mut searcher = searcher.clone();

0 commit comments

Comments
 (0)