Skip to content

Commit e477918

Browse files
Philipp-MShekhinah Memmel
authored andcommitted
Use the same WalkBuilder configuration for the global search file picker as the default file picker (helix-editor#4334)
Skip searching .git in global search, similar to how file picker skips listing files in .git.
1 parent 85777af commit e477918

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

helix-term/src/commands.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1868,10 +1868,15 @@ fn global_search(cx: &mut Context) {
18681868
.hidden(file_picker_config.hidden)
18691869
.parents(file_picker_config.parents)
18701870
.ignore(file_picker_config.ignore)
1871+
.follow_links(file_picker_config.follow_symlinks)
18711872
.git_ignore(file_picker_config.git_ignore)
18721873
.git_global(file_picker_config.git_global)
18731874
.git_exclude(file_picker_config.git_exclude)
18741875
.max_depth(file_picker_config.max_depth)
1876+
// We always want to ignore the .git directory, otherwise if
1877+
// `ignore` is turned off above, we end up with a lot of noise
1878+
// in our picker.
1879+
.filter_entry(|entry| entry.file_name() != ".git")
18751880
.build_parallel()
18761881
.run(|| {
18771882
let mut searcher = searcher.clone();

0 commit comments

Comments
 (0)