fix splitting with inverted selection

This commit is contained in:
Maxime Coste 2012-12-27 18:56:06 +01:00
parent 41979c91f4
commit 8bfb7da674

View File

@ -463,7 +463,8 @@ SelectionList split_selection(const Selection& selection,
result.push_back(Selection(begin, (begin == end) ? end : utf8::previous(end)));
begin = (*re_it)[0].second;
}
result.push_back(Selection(begin, selection.last()));
result.push_back(Selection(begin, std::max(selection.first(),
selection.last())));
return result;
}
catch (boost::regex_error& err)