Avoid grouping transactions created by different editors

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra
2022-01-27 15:51:46 +01:00
co-authored by Nathan Sobo
parent adf00fafdf
commit f055053fc9
5 changed files with 61 additions and 1 deletions
+6
View File
@@ -457,6 +457,12 @@ impl MultiBuffer {
}
}
pub fn avoid_grouping_next_transaction(&mut self, cx: &mut ModelContext<Self>) {
for BufferState { buffer, .. } in self.buffers.borrow().values() {
buffer.update(cx, |buffer, _| buffer.avoid_grouping_next_transaction());
}
}
pub fn set_active_selections(
&mut self,
selections: &[Selection<Anchor>],