From 555e705ccb5a84d84f27df3fa47d88ca1b338c61 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Sat, 23 Jul 2022 09:31:41 +0200 Subject: [PATCH] :art: --- crates/text/src/text.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/text/src/text.rs b/crates/text/src/text.rs index 60ae833650..838b20f2ee 100644 --- a/crates/text/src/text.rs +++ b/crates/text/src/text.rs @@ -1083,8 +1083,7 @@ impl Buffer { let mut new_ropes = RopeBuilder::new(self.visible_text.cursor(0), self.deleted_text.cursor(0)); - let fragment_ids = self.fragment_ids_for_edits(undo.counts.keys()); - for fragment_id in fragment_ids { + for fragment_id in self.fragment_ids_for_edits(undo.counts.keys()) { let preceding_fragments = old_fragments.slice(&Some(fragment_id), Bias::Left, &None); new_ropes.push_tree(preceding_fragments.summary().text); new_fragments.push_tree(preceding_fragments, &None);