Use ^
and $
to match the beginning and end of a line when searching (#1790)
Fixes #1737 Signed-off-by: nibon7 <nibon7@163.com>
This commit is contained in:
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;
|
||||
if let Ok(regex) = RegexBuilder::new(query)
|
||||
.case_insensitive(case_insensitive)
|
||||
.multi_line(true)
|
||||
.build()
|
||||
{
|
||||
search_impl(
|
||||
|
@ -73,6 +73,7 @@ pub fn regex_prompt(
|
||||
|
||||
match RegexBuilder::new(input)
|
||||
.case_insensitive(case_insensitive)
|
||||
.multi_line(true)
|
||||
.build()
|
||||
{
|
||||
Ok(regex) => {
|
||||
|
Loading…
Reference in New Issue
Block a user