1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-23 15:23:29 +03:00

RegexSelector: wrap on top if needed

This commit is contained in:
Maxime Coste 2011-09-20 12:00:06 +00:00
parent 13d14d4ff5
commit 3c06846aa3

View File

@ -17,6 +17,8 @@ Selection RegexSelector::operator()(const BufferIterator& cursor) const
if (boost::regex_search(cursor, cursor.buffer().end(), matches, m_regex, boost::match_nosubs))
return Selection(matches.begin()->first, matches.begin()->second);
else if (boost::regex_search(cursor.buffer().begin(), cursor, matches, m_regex, boost::match_nosubs))
return Selection(matches.begin()->first, matches.begin()->second);
}
catch (boost::regex_error& err)
{