Port buffer reload bug fixes back to gpui1 crates
This commit is contained in:
parent
5f1acae0d3
commit
0bed5e4562
5 changed files with 67 additions and 55 deletions
|
@ -41,6 +41,10 @@ impl Rope {
|
|||
Self::default()
|
||||
}
|
||||
|
||||
pub fn text_fingerprint(text: &str) -> RopeFingerprint {
|
||||
bromberg_sl2::hash_strict(text.as_bytes())
|
||||
}
|
||||
|
||||
pub fn append(&mut self, rope: Rope) {
|
||||
let mut chunks = rope.chunks.cursor::<()>();
|
||||
chunks.next(&());
|
||||
|
@ -931,7 +935,7 @@ impl<'a> From<&'a str> for ChunkSummary {
|
|||
fn from(text: &'a str) -> Self {
|
||||
Self {
|
||||
text: TextSummary::from(text),
|
||||
fingerprint: bromberg_sl2::hash_strict(text.as_bytes()),
|
||||
fingerprint: Rope::text_fingerprint(text),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue