summaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authornibon72022-03-12 07:05:50 +0000
committerGitHub2022-03-12 07:05:50 +0000
commit43997f1936d337a1a4248c98bff360ff9b4a3afc (patch)
treef22a45467cfcb564564eabd3db1c5bb27cdc2d7d /helix-term/src
parent61828ea519e27f7ae762917ad74d519b5fe511ac (diff)
Use `^` and `$` to match the beginning and end of a line when searching (#1790)
Fixes #1737 Signed-off-by: nibon7 <nibon7@163.com>
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/commands.rs1
-rw-r--r--helix-term/src/ui/mod.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 0052b43e..b9401d40 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -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(
diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs
index 6299a473..2273477f 100644
--- a/helix-term/src/ui/mod.rs
+++ b/helix-term/src/ui/mod.rs
@@ -73,6 +73,7 @@ pub fn regex_prompt(
match RegexBuilder::new(input)
.case_insensitive(case_insensitive)
+ .multi_line(true)
.build()
{
Ok(regex) => {