Skip to content

Commit

Permalink
Use ^ and $ to match the beginning and end of a line when searchi…
Browse files Browse the repository at this point in the history
…ng (helix-editor#1790)

Fixes helix-editor#1737

Signed-off-by: nibon7 <nibon7@163.com>
  • Loading branch information
nibon7 authored Mar 12, 2022
1 parent 61828ea commit 43997f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1642,6 +1642,7 @@ fn search_next_or_prev_impl(cx: &mut Context, movement: Movement, direction: Dir
let wrap_around = search_config.wrap_around;
if let Ok(regex) = RegexBuilder::new(query)
.case_insensitive(case_insensitive)
.multi_line(true)
.build()
{
search_impl(
Expand Down
1 change: 1 addition & 0 deletions helix-term/src/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ pub fn regex_prompt(

match RegexBuilder::new(input)
.case_insensitive(case_insensitive)
.multi_line(true)
.build()
{
Ok(regex) => {
Expand Down

0 comments on commit 43997f1

Please sign in to comment.