RegexSelector: wrap on top if needed
This commit is contained in:
parent
13d14d4ff5
commit
3c06846aa3
|
@ -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))
|
if (boost::regex_search(cursor, cursor.buffer().end(), matches, m_regex, boost::match_nosubs))
|
||||||
return Selection(matches.begin()->first, matches.begin()->second);
|
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)
|
catch (boost::regex_error& err)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user