Re-filter existing completions on selection update

We still request new completions, but this ensures results are up-to-date in the meantime.

Also: Cancel any pending completions task when we dismiss the completions dialog or start a new completions request.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
Nathan Sobo 2022-02-01 07:59:37 -07:00
parent b89a39bcb3
commit 497626ef2b
2 changed files with 115 additions and 91 deletions

View file

@ -106,7 +106,7 @@ impl Anchor {
}
impl ToOffset for Anchor {
fn to_offset<'a>(&self, snapshot: &MultiBufferSnapshot) -> usize {
fn to_offset(&self, snapshot: &MultiBufferSnapshot) -> usize {
self.summary(snapshot)
}
}