pub fn rope_split_block(
store: &Store,
current_block_id: EntityId,
byte_offset_in_block: u32,
new_block_id: EntityId,
)Expand description
Split an existing block in the rope at byte_offset_in_block:
- inserts a
\ninter-block boundary at the absolute byte positionblock_start + byte_offset_in_blockin the rope - shifts entries past that position by +1 byte
- inserts a new entry for
new_block_idatblock_start + byte_offset_in_block + 1(right after the newline), placed immediately after the original block in the entries Vec
byte_offset_in_block may be 0 (split before first char of block,
i.e. insert empty block before this one) or equal to the block’s
byte length (split after last char, i.e. insert empty block after).