mirror of https://github.com/helix-editor/helix
Use `^` and `$` to match the beginning and end of a line when searching (#1790)
Fixes #1737 Signed-off-by: nibon7 <nibon7@163.com>pull/1751/head
parent
61828ea519
commit
43997f1936
|
@ -1642,6 +1642,7 @@ fn search_next_or_prev_impl(cx: &mut Context, movement: Movement, direction: Dir
|
||||||
let wrap_around = search_config.wrap_around;
|
let wrap_around = search_config.wrap_around;
|
||||||
if let Ok(regex) = RegexBuilder::new(query)
|
if let Ok(regex) = RegexBuilder::new(query)
|
||||||
.case_insensitive(case_insensitive)
|
.case_insensitive(case_insensitive)
|
||||||
|
.multi_line(true)
|
||||||
.build()
|
.build()
|
||||||
{
|
{
|
||||||
search_impl(
|
search_impl(
|
||||||
|
|
|
@ -73,6 +73,7 @@ pub fn regex_prompt(
|
||||||
|
|
||||||
match RegexBuilder::new(input)
|
match RegexBuilder::new(input)
|
||||||
.case_insensitive(case_insensitive)
|
.case_insensitive(case_insensitive)
|
||||||
|
.multi_line(true)
|
||||||
.build()
|
.build()
|
||||||
{
|
{
|
||||||
Ok(regex) => {
|
Ok(regex) => {
|
||||||
|
|
Loading…
Reference in New Issue