Editor: fix utf8 handling in prepare_insert

This commit is contained in:
Maxime Coste 2013-04-03 18:52:49 +02:00
parent 72395840f9
commit 5bb8e656c5

View File

@ -51,7 +51,7 @@ static BufferIterator prepare_insert(Buffer& buffer, const Selection& sel,
if (pos.column() == buffer.line_length(pos.line()) - 1)
return pos;
else
return pos+1;
return utf8::next(pos);
}
case InsertMode::InsertAtLineBegin:
return buffer.iterator_at_line_begin(sel.begin());