Fix double check_invariant in SelectionList construction, and set main selection to last
This commit is contained in:
parent
2ce0a5a8a8
commit
d6a2d77857
|
@ -22,23 +22,18 @@ SelectionList::SelectionList(Buffer& buffer, Selection s, size_t timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
SelectionList::SelectionList(Buffer& buffer, Selection s)
|
SelectionList::SelectionList(Buffer& buffer, Selection s)
|
||||||
: SelectionList(buffer, std::move(s), buffer.timestamp())
|
: SelectionList(buffer, std::move(s), buffer.timestamp()) {}
|
||||||
{
|
|
||||||
check_invariant();
|
|
||||||
}
|
|
||||||
|
|
||||||
SelectionList::SelectionList(Buffer& buffer, Vector<Selection> s, size_t timestamp)
|
SelectionList::SelectionList(Buffer& buffer, Vector<Selection> s, size_t timestamp)
|
||||||
: m_buffer(&buffer), m_selections(std::move(s)), m_timestamp(timestamp)
|
: m_buffer(&buffer), m_selections(std::move(s)), m_timestamp(timestamp)
|
||||||
{
|
{
|
||||||
kak_assert(size() > 0);
|
kak_assert(size() > 0);
|
||||||
|
m_main = size() - 1;
|
||||||
check_invariant();
|
check_invariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
SelectionList::SelectionList(Buffer& buffer, Vector<Selection> s)
|
SelectionList::SelectionList(Buffer& buffer, Vector<Selection> s)
|
||||||
: SelectionList(buffer, std::move(s), buffer.timestamp())
|
: SelectionList(buffer, std::move(s), buffer.timestamp()) {}
|
||||||
{
|
|
||||||
check_invariant();
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user