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:
@@ -1331,15 +1331,15 @@ impl Buffer {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn wait_for_anchors<'a>(
|
||||
pub fn wait_for_anchors(
|
||||
&mut self,
|
||||
anchors: impl IntoIterator<Item = &'a Anchor>,
|
||||
anchors: impl IntoIterator<Item = Anchor>,
|
||||
) -> impl 'static + Future<Output = Result<()>> {
|
||||
let mut futures = Vec::new();
|
||||
for anchor in anchors {
|
||||
if !self.version.observed(anchor.timestamp)
|
||||
&& *anchor != Anchor::MAX
|
||||
&& *anchor != Anchor::MIN
|
||||
&& anchor != Anchor::MAX
|
||||
&& anchor != Anchor::MIN
|
||||
{
|
||||
let (tx, rx) = oneshot::channel();
|
||||
self.edit_id_resolvers
|
||||
|
||||
Reference in New Issue
Block a user