Editor: fix utf8 handling in prepare_insert
This commit is contained in:
parent
72395840f9
commit
5bb8e656c5
|
@ -51,7 +51,7 @@ static BufferIterator prepare_insert(Buffer& buffer, const Selection& sel,
|
||||||
if (pos.column() == buffer.line_length(pos.line()) - 1)
|
if (pos.column() == buffer.line_length(pos.line()) - 1)
|
||||||
return pos;
|
return pos;
|
||||||
else
|
else
|
||||||
return pos+1;
|
return utf8::next(pos);
|
||||||
}
|
}
|
||||||
case InsertMode::InsertAtLineBegin:
|
case InsertMode::InsertAtLineBegin:
|
||||||
return buffer.iterator_at_line_begin(sel.begin());
|
return buffer.iterator_at_line_begin(sel.begin());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user