show thread states in thread picker
This commit is contained in:
parent
00cccdc62a
commit
9a1916ebfd
1 changed files with 11 additions and 1 deletions
|
@ -102,10 +102,20 @@ fn thread_picker(cx: &mut Context, callback_fn: impl Fn(&mut Editor, &dap::Threa
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let thread_states = debugger.thread_states.clone();
|
||||||
let picker = Picker::new(
|
let picker = Picker::new(
|
||||||
true,
|
true,
|
||||||
threads,
|
threads,
|
||||||
|thread| thread.name.clone().into(), // TODO: include thread_states in the label
|
move |thread| {
|
||||||
|
format!(
|
||||||
|
"{} ({})",
|
||||||
|
thread.name,
|
||||||
|
thread_states
|
||||||
|
.get(&thread.id)
|
||||||
|
.unwrap_or(&"unknown".to_owned())
|
||||||
|
)
|
||||||
|
.into()
|
||||||
|
},
|
||||||
move |editor, thread, _action| callback_fn(editor, thread),
|
move |editor, thread, _action| callback_fn(editor, thread),
|
||||||
);
|
);
|
||||||
cx.push_layer(Box::new(picker))
|
cx.push_layer(Box::new(picker))
|
||||||
|
|
Loading…
Reference in a new issue