DisplayAtom: add utf8 sanity check
This commit is contained in:
parent
5602bc10e8
commit
ed592a3005
|
@ -1,6 +1,7 @@
|
||||||
#include "display_buffer.hh"
|
#include "display_buffer.hh"
|
||||||
|
|
||||||
#include "assert.hh"
|
#include "assert.hh"
|
||||||
|
#include "utf8.hh"
|
||||||
|
|
||||||
namespace Kakoune
|
namespace Kakoune
|
||||||
{
|
{
|
||||||
|
@ -11,6 +12,8 @@ DisplayLine::iterator DisplayLine::split(iterator it, BufferIterator pos)
|
||||||
assert(it->content.begin() < pos);
|
assert(it->content.begin() < pos);
|
||||||
assert(it->content.end() > pos);
|
assert(it->content.end() > pos);
|
||||||
|
|
||||||
|
assert(utf8::is_character_start(pos));
|
||||||
|
|
||||||
DisplayAtom atom = *it;
|
DisplayAtom atom = *it;
|
||||||
atom.content.m_end = pos;
|
atom.content.m_end = pos;
|
||||||
it->content.m_begin = pos;
|
it->content.m_begin = pos;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user