Take a cx in MultiBuffer::start_transaction
This commit is contained in:
parent
87d16c271e
commit
4ee404a0af
2 changed files with 4 additions and 5 deletions
|
@ -3211,18 +3211,16 @@ impl Editor {
|
||||||
|
|
||||||
fn start_transaction(&mut self, cx: &mut ViewContext<Self>) {
|
fn start_transaction(&mut self, cx: &mut ViewContext<Self>) {
|
||||||
self.end_selection(cx);
|
self.end_selection(cx);
|
||||||
self.buffer.update(cx, |buffer, _| {
|
self.buffer.update(cx, |buffer, cx| {
|
||||||
buffer
|
buffer
|
||||||
.start_transaction(Some(self.selection_set_id))
|
.start_transaction([self.selection_set_id], cx)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
fn end_transaction(&self, cx: &mut ViewContext<Self>) {
|
fn end_transaction(&self, cx: &mut ViewContext<Self>) {
|
||||||
self.buffer.update(cx, |buffer, cx| {
|
self.buffer.update(cx, |buffer, cx| {
|
||||||
buffer
|
buffer.end_transaction([self.selection_set_id], cx).unwrap()
|
||||||
.end_transaction(Some(self.selection_set_id), cx)
|
|
||||||
.unwrap()
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -169,6 +169,7 @@ impl MultiBuffer {
|
||||||
pub fn start_transaction(
|
pub fn start_transaction(
|
||||||
&mut self,
|
&mut self,
|
||||||
selection_set_ids: impl IntoIterator<Item = SelectionSetId>,
|
selection_set_ids: impl IntoIterator<Item = SelectionSetId>,
|
||||||
|
cx: &mut ModelContext<Self>,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue