1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-20 18:11:36 +03:00
kakoune/src/display_buffer.cc

21 lines
428 B
C++
Raw Normal View History

2011-09-02 20:51:20 +04:00
#include "display_buffer.hh"
#include "assert.hh"
2011-09-02 20:51:20 +04:00
namespace Kakoune
{
DisplayLine::iterator DisplayLine::split(iterator it, BufferIterator pos)
{
assert(it->content.type() == AtomContent::BufferRange);
assert(it->content.begin() < pos);
assert(it->content.end() > pos);
DisplayAtom atom = *it;
atom.content.end() = pos;
it->content.begin() = pos;
return m_atoms.insert(it, std::move(atom));
}
2011-09-02 20:51:20 +04:00
}