summaryrefslogtreecommitdiff
path: root/src/buffer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.cc')
-rw-r--r--src/buffer.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/buffer.cc b/src/buffer.cc
index 81804c79..0b0dca1e 100644
--- a/src/buffer.cc
+++ b/src/buffer.cc
@@ -351,7 +351,9 @@ void Buffer::apply_modification(const Modification& modification)
kak_assert(is_valid(coord));
// in modifications, end coords should be {line_count(), 0}
- kak_assert(coord != ByteCoord(line_count()-1, m_lines.back().length()));
+ kak_assert((m_lines.empty() and coord == ByteCoord{0,0} ) or
+ coord != ByteCoord(line_count()-1, m_lines.back().length()));
+
switch (modification.type)
{
case Modification::Insert: