insert-after-char should insert-before-char if char is EOL marker
This commit is contained in:
parent
7557fc4c1e
commit
c6a8d1597e
@ -342,7 +342,7 @@ void PieceTable::begin_insert(const Cursor & cursor, bool before)
|
||||
{
|
||||
Piece * piece = cursor.iterator.piece;
|
||||
uint32_t offset = cursor.iterator.offset;
|
||||
if (!before && cursor.iterator.has_char())
|
||||
if (!before && cursor.iterator.has_char() && (*cursor != INTERNAL_EOL))
|
||||
{
|
||||
offset += cursor.iterator.num_bytes_in_code_point();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user