This commit is contained in:
Antonio Scandurra
2021-05-25 14:20:53 +02:00
parent bafac35d6a
commit 2e7593dd79
2 changed files with 2 additions and 5 deletions
+1 -2
View File
@@ -418,11 +418,10 @@ impl FoldMapSnapshot {
transform_cursor.seek(&offset, SeekBias::Right, &());
let overshoot = offset.0 - transform_cursor.start().display.bytes;
let buffer_offset = transform_cursor.start().buffer.bytes + overshoot;
let rope_cursor = self.buffer.text_for_range(buffer_offset..self.buffer.len());
Chunks {
transform_cursor,
buffer_offset,
buffer_chunks: rope_cursor,
buffer_chunks: self.buffer.text_for_range(buffer_offset..self.buffer.len()),
}
}