1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-23 19:46:33 +03:00

RegexSelector: search the entire buffer instead of the current line

This commit is contained in:
Maxime Coste 2011-09-02 18:38:10 +00:00
parent 39f12a1766
commit 61b37a6057

View File

@ -14,12 +14,9 @@ Selection RegexSelector::operator()(const BufferIterator& cursor) const
try
{
while (not line_end.is_end() and *line_end != '\n')
++line_end;
boost::match_results<BufferIterator> matches;
if (boost::regex_search(cursor, line_end, matches, m_regex))
if (boost::regex_search(cursor, cursor.buffer().end(), matches, m_regex, boost::match_nosubs))
return Selection(matches.begin()->first, matches.begin()->second);
}
catch (boost::regex_error& err)