Merge remote-tracking branch 'occivink/master'
This commit is contained in:
commit
f358579e42
|
@ -239,13 +239,12 @@ inline bool find_last_match(const Buffer& buffer, const BufferIterator& pos,
|
||||||
const bool is_pos_eol = is_eol(buffer, pos.coord());
|
const bool is_pos_eol = is_eol(buffer, pos.coord());
|
||||||
const bool is_pos_eow = is_eow(buffer, pos.coord());
|
const bool is_pos_eow = is_eow(buffer, pos.coord());
|
||||||
auto begin = buffer.begin();
|
auto begin = buffer.begin();
|
||||||
while (regex_search(begin, pos, matches, regex,
|
while (begin != pos and regex_search(begin, pos, matches, regex,
|
||||||
match_flags(is_bol(begin.coord()), is_pos_eol, is_pos_eow)))
|
match_flags(is_bol(begin.coord()), is_pos_eol, is_pos_eow)))
|
||||||
{
|
{
|
||||||
if (begin == matches[0].second)
|
begin = utf8::next(matches[0].first, pos);
|
||||||
break;
|
if (res.empty() or matches[0].second > res[0].second)
|
||||||
begin = matches[0].second;
|
res.swap(matches);
|
||||||
res.swap(matches);
|
|
||||||
}
|
}
|
||||||
return not res.empty();
|
return not res.empty();
|
||||||
}
|
}
|
||||||
|
|
1
test/unit/search-reverse-rightmost/missed-match/cmd
Normal file
1
test/unit/search-reverse-rightmost/missed-match/cmd
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<a-/>(ab|baba)<ret>
|
1
test/unit/search-reverse-rightmost/missed-match/in
Normal file
1
test/unit/search-reverse-rightmost/missed-match/in
Normal file
|
@ -0,0 +1 @@
|
||||||
|
ababa%(b)
|
|
@ -0,0 +1 @@
|
||||||
|
baba
|
1
test/unit/search-reverse-rightmost/overlap/cmd
Normal file
1
test/unit/search-reverse-rightmost/overlap/cmd
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<a-/>...<ret>
|
1
test/unit/search-reverse-rightmost/overlap/in
Normal file
1
test/unit/search-reverse-rightmost/overlap/in
Normal file
|
@ -0,0 +1 @@
|
||||||
|
abcdefg%(h)
|
1
test/unit/search-reverse-rightmost/overlap/selections
Normal file
1
test/unit/search-reverse-rightmost/overlap/selections
Normal file
|
@ -0,0 +1 @@
|
||||||
|
efg
|
Loading…
Reference in New Issue
Block a user