SelectionList should never be empty

This commit is contained in:
Maxime Coste 2013-12-14 14:11:14 +00:00
parent 77590fe2e8
commit eced7d4c24

View File

@ -103,6 +103,7 @@ void SelectionList::update_erase(const Buffer& buffer, BufferCoord begin, Buffer
void SelectionList::check_invariant() const
{
kak_assert(size() > 0);
kak_assert(m_main < size());
for (size_t i = 0; i+1 < size(); ++ i)
kak_assert((*this)[i].min() <= (*this)[i+1].min());