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:
parent
a8b3826955
commit
bd7d50f339
6 changed files with 229 additions and 167 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue