summaryrefslogtreecommitdiff
path: root/src/buffer.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-01-24 14:08:24 +0100
committerMaxime Coste <frrrwww@gmail.com>2013-01-24 14:08:24 +0100
commit54725ebcca98c2f89517a838f1c9b516c8b1b74e (patch)
treecc431113e399666691f8a34e78c0ac63c0c2fd03 /src/buffer.cc
parent28cb78bed198c69f005748813a4580467c9a669d (diff)
Buffer::do_insert: fix on_insert call when inserting at the end
Diffstat (limited to 'src/buffer.cc')
-rw-r--r--src/buffer.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buffer.cc b/src/buffer.cc
index d94c5617..deb833f1 100644
--- a/src/buffer.cc
+++ b/src/buffer.cc
@@ -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