remove useless SelectionList copy in keep
This commit is contained in:
parent
4f452474c8
commit
c84b861d2f
|
@ -541,9 +541,8 @@ void keep(Context& context)
|
||||||
regex_prompt(context, prompt, [](const Regex& ex, Context& context) {
|
regex_prompt(context, prompt, [](const Regex& ex, Context& context) {
|
||||||
Editor& editor = context.editor();
|
Editor& editor = context.editor();
|
||||||
const Buffer& buffer = context.buffer();
|
const Buffer& buffer = context.buffer();
|
||||||
SelectionList sels = editor.selections();
|
|
||||||
SelectionList keep;
|
SelectionList keep;
|
||||||
for (auto& sel : sels)
|
for (auto& sel : editor.selections())
|
||||||
{
|
{
|
||||||
if (boost::regex_search(buffer.iterator_at(sel.min()),
|
if (boost::regex_search(buffer.iterator_at(sel.min()),
|
||||||
utf8::next(buffer.iterator_at(sel.max())), ex) == matching)
|
utf8::next(buffer.iterator_at(sel.max())), ex) == matching)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user