mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-03-17 20:28:03 +02:00
Fix off-by-one bug in searcher.
This commit is contained in:
parent
e3da726836
commit
98a48b44bc
@ -195,7 +195,7 @@ impl Grep {
|
|||||||
let (prevnl, nextnl) = self.find_line(buf, e, e);
|
let (prevnl, nextnl) = self.find_line(buf, e, e);
|
||||||
match self.re.shortest_match(&buf[prevnl..nextnl]) {
|
match self.re.shortest_match(&buf[prevnl..nextnl]) {
|
||||||
None => {
|
None => {
|
||||||
start = nextnl + 1;
|
start = nextnl;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Some(_) => {
|
Some(_) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user