select_all_matches: reject match that start at the end of originating selection

This commit is contained in:
Maxime Coste 2012-09-19 14:04:09 +02:00
parent 81eae79154
commit e86e3bda4d

View File

@ -430,6 +430,9 @@ SelectionAndCapturesList select_all_matches(const Selection& selection,
BufferIterator begin = (*re_it)[0].first; BufferIterator begin = (*re_it)[0].first;
BufferIterator end = (*re_it)[0].second; BufferIterator end = (*re_it)[0].second;
if (begin == selection.end())
continue;
CaptureList captures; CaptureList captures;
for (auto& match : *re_it) for (auto& match : *re_it)
captures.push_back(String(match.first, match.second)); captures.push_back(String(match.first, match.second));