diff --git a/src/display_buffer.cc b/src/display_buffer.cc index ac2bb593..576e5a14 100644 --- a/src/display_buffer.cc +++ b/src/display_buffer.cc @@ -1,6 +1,7 @@ #include "display_buffer.hh" #include "assert.hh" +#include "utf8.hh" namespace Kakoune { @@ -11,6 +12,8 @@ DisplayLine::iterator DisplayLine::split(iterator it, BufferIterator pos) assert(it->content.begin() < pos); assert(it->content.end() > pos); + assert(utf8::is_character_start(pos)); + DisplayAtom atom = *it; atom.content.m_end = pos; it->content.m_begin = pos;