Auto merge of #16261 - Veykril:import-map-fix, r=Veykril

internal: Move query limits to the caller

Prior we calculated up to `limit` entries from a query, then filtered from that leaving us with less entries than the limit in some cases (which might give odd completion behavior due to items disappearing). This changes it so we filter before checking the limit.
This commit is contained in:
bors 2024-01-04 18:27:38 +00:00
commit c84352a346
10 changed files with 146 additions and 124 deletions

View file

@ -163,7 +163,7 @@ impl<'a> SymbolCollector<'a> {
}
// Record renamed imports.
// In case it imports multiple items under different namespaces we just pick one arbitrarily
// FIXME: In case it imports multiple items under different namespaces we just pick one arbitrarily
// for now.
for id in scope.imports() {
let loc = id.import.lookup(self.db.upcast());