diff options
-rw-r--r-- | helix-term/src/commands.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index e869446e..a5203352 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -1760,6 +1760,8 @@ fn search_selection(cx: &mut Context) { .selection(view.id) .iter() .map(|selection| regex::escape(&selection.fragment(contents))) + .collect::<HashSet<_>>() // Collect into hashset to deduplicate identical regexes + .into_iter() .collect::<Vec<_>>() .join("|"); |