Fix 'invalid insertion' panic when following
Wait for the necessary buffer operations to arrive before attempting to set selections and scroll top.
This commit is contained in:
@@ -1313,10 +1313,10 @@ impl Buffer {
|
||||
self.text.wait_for_edits(edit_ids)
|
||||
}
|
||||
|
||||
pub fn wait_for_anchors<'a>(
|
||||
pub fn wait_for_anchors(
|
||||
&mut self,
|
||||
anchors: impl IntoIterator<Item = &'a Anchor>,
|
||||
) -> impl Future<Output = Result<()>> {
|
||||
anchors: impl IntoIterator<Item = Anchor>,
|
||||
) -> impl 'static + Future<Output = Result<()>> {
|
||||
self.text.wait_for_anchors(anchors)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user