Filter out other languages' tasks from the task modal (#10839)

Release Notes:

- Fixed tasks modal showing history from languages, not matching the
currently active buffer's one
This commit is contained in:
Kirill Bulatov 2024-04-22 12:36:26 +03:00 committed by GitHub
parent a0fa8a489b
commit dd41c10099
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 209 additions and 5 deletions

View file

@ -219,6 +219,13 @@ impl Inventory {
.iter()
.rev()
.filter(|(_, task)| !task.original_task().ignore_previously_resolved)
.filter(|(task_kind, _)| {
if matches!(task_kind, TaskSourceKind::Language { .. }) {
Some(task_kind) == task_source_kind.as_ref()
} else {
true
}
})
.fold(
HashMap::default(),
|mut tasks, (task_source_kind, resolved_task)| {