This commit is contained in:
Antonio Scandurra committed 2021-05-25 14:20:53 +02:00
1 parent ad64bc51ec
commit 7c3bc2fec3
2 files changed
+2 -5

No files matched your search

+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()),
}
}
+1 -3
View File
@@ -377,9 +377,7 @@ impl<'a> Iterator for HighlightedChunks<'a> {
}
}
let style_id = self.style_id;
self.style_id = StyleId::default();
Some((mem::take(&mut self.chunk), style_id))
Some((mem::take(&mut self.chunk), mem::take(&mut self.style_id)))
}
}