Closed jcs090218 closed 2 months ago
Not directly, but you can convert a (line, col)
pair into a byte offset like this:
let mut rope: Rope = todo!();
let line: usize = todo!();
let col: usize = todo!();
let byte_offset = rope.byte_of_line(line) + col;
rope.insert(byte_offset, "");
Is there way to insert bytes by line and column?