Merge remote-tracking branch 'occivink/master'
This commit is contained in:
commit
f358579e42
|
@ -239,12 +239,11 @@ 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_eow = is_eow(buffer, pos.coord());
|
||||
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)))
|
||||
{
|
||||
if (begin == matches[0].second)
|
||||
break;
|
||||
begin = matches[0].second;
|
||||
begin = utf8::next(matches[0].first, pos);
|
||||
if (res.empty() or matches[0].second > res[0].second)
|
||||
res.swap(matches);
|
||||
}
|
||||
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