Allow clicking on commands in the command palette

This commit is contained in:
Conrad Irwin 2023-11-13 21:42:27 -07:00
parent 4ef95f05e8
commit ad017a5df5
5 changed files with 104 additions and 25 deletions

View file

@ -101,6 +101,12 @@ pub struct FocusHandle {
handles: Arc<RwLock<SlotMap<FocusId, AtomicUsize>>>,
}
impl std::fmt::Debug for FocusHandle {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_fmt(format_args!("FocusHandle({:?})", self.id))
}
}
impl FocusHandle {
pub(crate) fn new(handles: &Arc<RwLock<SlotMap<FocusId, AtomicUsize>>>) -> Self {
let id = handles.write().insert(AtomicUsize::new(1));