Skip to content

Commit

Permalink
tasks: fix panic in render_match (zed-industries#10137)
Browse files Browse the repository at this point in the history
Release Notes:

- Fixed panic in tasks modal (Preview only).
  • Loading branch information
osiewicz authored Apr 3, 2024
1 parent 79272b7 commit 879f361
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/tasks_ui/src/modal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ impl PickerDelegate for TasksModalDelegate {
cx: &mut ViewContext<picker::Picker<Self>>,
) -> Option<Self::ListItem> {
let candidates = self.candidates.as_ref()?;
let hit = &self.matches[ix];
let (source_kind, _) = &candidates[hit.candidate_id];
let hit = &self.matches.get(ix)?;
let (source_kind, _) = &candidates.get(hit.candidate_id)?;
let details = match source_kind {
TaskSourceKind::UserInput => "user input".to_string(),
TaskSourceKind::Buffer => "language extension".to_string(),
Expand Down

0 comments on commit 879f361

Please sign in to comment.