From fb41e1fdf9a08bcf869cf9b4e3a4325cdfb18056 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 3 Jun 2013 19:01:07 +0200 Subject: tweak Buffer::do_insert --- src/buffer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/buffer.cc') diff --git a/src/buffer.cc b/src/buffer.cc index 4738cc47..e0c4c3ff 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -475,7 +475,7 @@ void Buffer::do_insert(const BufferCoord& pos, const String& content) m_lines.push_back({ offset + start, content.substr(start) }); begin = pos.column == 0 ? pos : BufferCoord{ pos.line + 1, 0 }; - end = this->end().coord(); + end = BufferCoord{ line_count()-1, m_lines.back().length() }; } else { -- cgit v1.2.3