tweak Buffer::do_insert

This commit is contained in:
Maxime Coste 2013-06-03 19:01:07 +02:00
parent 4ef1bfa4db
commit fb41e1fdf9

View File

@ -475,7 +475,7 @@ void Buffer::do_insert(const BufferCoord& pos, const String& content)
m_lines.push_back({ offset + start, content.substr(start) }); m_lines.push_back({ offset + start, content.substr(start) });
begin = pos.column == 0 ? pos : BufferCoord{ pos.line + 1, 0 }; begin = pos.column == 0 ? pos : BufferCoord{ pos.line + 1, 0 };
end = this->end().coord(); end = BufferCoord{ line_count()-1, m_lines.back().length() };
} }
else else
{ {