Buffer::do_insert: fix on_insert call when inserting at the end
This commit is contained in:
parent
28cb78bed1
commit
54725ebcca
|
@ -272,7 +272,7 @@ void Buffer::do_insert(const BufferIterator& pos, const String& content)
|
||||||
if (start != content.length())
|
if (start != content.length())
|
||||||
m_lines.push_back({ offset + start, content.substr(start) });
|
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();
|
end_it = end();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user