Skip to content

Commit

Permalink
Use the same WalkBuilder configuration for the global search file p…
Browse files Browse the repository at this point in the history
…icker as the default file picker (helix-editor#4334)

Skip searching .git in global search, similar to how file picker skips listing files in .git.
  • Loading branch information
Philipp-M authored and pathwave committed Nov 4, 2022
1 parent c5a06df commit 224c041
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1872,10 +1872,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();
Expand Down

0 comments on commit 224c041

Please sign in to comment.