diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2012-10-08 14:28:54 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2012-10-08 14:28:54 +0200 |
| commit | ed592a30056f65f5c431c10efc9e11f970239cbb (patch) | |
| tree | 424cdea4bd1d10ae5bb1ccc208e25f9d75142bc8 /src/display_buffer.cc | |
| parent | 5602bc10e879e166af49ed9255bb5742f9390a2d (diff) | |
DisplayAtom: add utf8 sanity check
Diffstat (limited to 'src/display_buffer.cc')
| -rw-r--r-- | src/display_buffer.cc | 3 |
1 files changed, 3 insertions, 0 deletions
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; |
