pub fn position_to_char(position: Position, rope: Rope) -> Option<CharOffset>