tasks: fix panic in render_match (#10137)
Release Notes: - Fixed panic in tasks modal (Preview only).
This commit is contained in:
parent
79272b75e3
commit
879f361966
1 changed files with 2 additions and 2 deletions
|
@ -307,8 +307,8 @@ impl PickerDelegate for TasksModalDelegate {
|
||||||
cx: &mut ViewContext<picker::Picker<Self>>,
|
cx: &mut ViewContext<picker::Picker<Self>>,
|
||||||
) -> Option<Self::ListItem> {
|
) -> Option<Self::ListItem> {
|
||||||
let candidates = self.candidates.as_ref()?;
|
let candidates = self.candidates.as_ref()?;
|
||||||
let hit = &self.matches[ix];
|
let hit = &self.matches.get(ix)?;
|
||||||
let (source_kind, _) = &candidates[hit.candidate_id];
|
let (source_kind, _) = &candidates.get(hit.candidate_id)?;
|
||||||
let details = match source_kind {
|
let details = match source_kind {
|
||||||
TaskSourceKind::UserInput => "user input".to_string(),
|
TaskSourceKind::UserInput => "user input".to_string(),
|
||||||
TaskSourceKind::Buffer => "language extension".to_string(),
|
TaskSourceKind::Buffer => "language extension".to_string(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue