Remove Context::set_selections, use Context::selections() = ...
This commit is contained in:
parent
b570c68c75
commit
9f65a4e6dd
|
@ -211,12 +211,6 @@ Vector<String> Context::selections_content() const
|
|||
return contents;
|
||||
}
|
||||
|
||||
void Context::set_selections(Vector<Selection> sels)
|
||||
{
|
||||
*m_selections = std::move(sels);
|
||||
(*m_selections).check_invariant();
|
||||
}
|
||||
|
||||
void Context::begin_edition()
|
||||
{
|
||||
if (m_edition_level >= 0)
|
||||
|
|
|
@ -89,7 +89,6 @@ public:
|
|||
SelectionList& selections();
|
||||
const SelectionList& selections() const;
|
||||
Vector<String> selections_content() const;
|
||||
void set_selections(Vector<Selection> sels);
|
||||
|
||||
void change_buffer(Buffer& buffer);
|
||||
|
||||
|
|
|
@ -766,7 +766,7 @@ void keep(Context& context, NormalParams)
|
|||
}
|
||||
if (keep.empty())
|
||||
throw runtime_error("no selections remaining");
|
||||
context.set_selections(std::move(keep));
|
||||
context.selections() = std::move(keep);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -788,7 +788,7 @@ void keep_pipe(Context& context, NormalParams)
|
|||
}
|
||||
if (keep.empty())
|
||||
throw runtime_error("no selections remaining");
|
||||
context.set_selections(std::move(keep));
|
||||
context.selections() = std::move(keep);
|
||||
});
|
||||
}
|
||||
template<bool indent_empty = false>
|
||||
|
@ -1267,7 +1267,7 @@ void undo(Context& context, NormalParams)
|
|||
{
|
||||
auto ranges = compute_modified_ranges(buffer, timestamp);
|
||||
if (not ranges.empty())
|
||||
context.set_selections(std::move(ranges));
|
||||
context.selections() = std::move(ranges);
|
||||
context.selections().avoid_eol();
|
||||
}
|
||||
else if (not res)
|
||||
|
@ -1284,7 +1284,7 @@ void redo(Context& context, NormalParams)
|
|||
{
|
||||
auto ranges = compute_modified_ranges(buffer, timestamp);
|
||||
if (not ranges.empty())
|
||||
context.set_selections(std::move(ranges));
|
||||
context.selections() = std::move(ranges);
|
||||
context.selections().avoid_eol();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user