Buffer::do_insert: fix on_insert call when inserting at the end

This commit is contained in:
Maxime Coste 2013-01-24 14:08:24 +01:00
parent 28cb78bed1
commit 54725ebcca

View File

@ -272,7 +272,7 @@ void Buffer::do_insert(const BufferIterator& pos, const String& content)
if (start != content.length())
m_lines.push_back({ offset + start, content.substr(start) });
begin_it = BufferIterator{*this, { pos.line() + 1, 0 }};
begin_it = pos.column() == 0 ? pos : BufferIterator{*this, { pos.line() + 1, 0 }};
end_it = end();
}
else