1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-19 01:11:36 +03:00

Fix finding next match when the cursor is in the middle of the only match

This commit is contained in:
Maxime Coste 2014-10-01 13:54:33 +01:00
parent d55d041c6a
commit 3ea690a92e

View File

@ -252,10 +252,10 @@ bool find_match_in_buffer(const Buffer& buffer, const BufferIterator pos,
{ {
if (direction == Forward) if (direction == Forward)
return (boost::regex_search(pos, buffer.end(), matches, ex) or return (boost::regex_search(pos, buffer.end(), matches, ex) or
boost::regex_search(buffer.begin(), pos, matches, ex)); boost::regex_search(buffer.begin(), buffer.end(), matches, ex));
else else
return (find_last_match(buffer.begin(), pos, matches, ex) or return (find_last_match(buffer.begin(), pos, matches, ex) or
find_last_match(pos, buffer.end(), matches, ex)); find_last_match(buffer.begin(), buffer.end(), matches, ex));
} }
template<Direction direction> template<Direction direction>