mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-29 01:24:52 +03:00
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(buffer, std::move(s), buffer.timestamp())
|
||||
{
|
||||
check_invariant();
|
||||
}
|
||||
: SelectionList(buffer, std::move(s), buffer.timestamp()) {}
|
||||
|
||||
SelectionList::SelectionList(Buffer& buffer, Vector<Selection> s, size_t timestamp)
|
||||
: m_buffer(&buffer), m_selections(std::move(s)), m_timestamp(timestamp)
|
||||
{
|
||||
kak_assert(size() > 0);
|
||||
m_main = size() - 1;
|
||||
check_invariant();
|
||||
}
|
||||
|
||||
SelectionList::SelectionList(Buffer& buffer, Vector<Selection> s)
|
||||
: SelectionList(buffer, std::move(s), buffer.timestamp())
|
||||
{
|
||||
check_invariant();
|
||||
}
|
||||
: SelectionList(buffer, std::move(s), buffer.timestamp()) {}
|
||||
|
||||
namespace
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user