mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-18 08:51:46 +03:00
Fix LineChangeWatcher behaviour when inserting at buffer end
This commit is contained in:
parent
5b3233184e
commit
22f2f68d58
@ -61,6 +61,11 @@ std::vector<LineModification> LineChangeWatcher::compute_modifications()
|
|||||||
|
|
||||||
void LineChangeWatcher::on_insert(const Buffer& buffer, BufferCoord begin, BufferCoord end)
|
void LineChangeWatcher::on_insert(const Buffer& buffer, BufferCoord begin, BufferCoord end)
|
||||||
{
|
{
|
||||||
|
if (buffer.is_end(end))
|
||||||
|
{
|
||||||
|
kak_assert(begin.column == 0);
|
||||||
|
--begin.line;
|
||||||
|
}
|
||||||
m_changes.push_back({begin.line, end.line - begin.line});
|
m_changes.push_back({begin.line, end.line - begin.line});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user