debugger: Make the stack frame list and module list keyboard-navigable (#30682)
- Switch stack frame list and module list to `UniformList` to access scrolling behavior - Implement `menu::` navigation actions Release Notes: - Debugger Beta: Added support for menu navigation actions (`ctrl-n`, `ctrl-p`, etc.) in the stack frame list and module list.
This commit is contained in:
parent
6420df3975
commit
87cb498a41
7 changed files with 360 additions and 201 deletions
|
@ -1219,10 +1219,16 @@ impl RunningState {
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn go_to_selected_stack_frame(&self, window: &Window, cx: &mut Context<Self>) {
|
||||
pub(crate) fn go_to_selected_stack_frame(&self, window: &mut Window, cx: &mut Context<Self>) {
|
||||
if self.thread_id.is_some() {
|
||||
self.stack_frame_list
|
||||
.update(cx, |list, cx| list.go_to_selected_stack_frame(window, cx));
|
||||
.update(cx, |list, cx| {
|
||||
let Some(stack_frame_id) = list.opened_stack_frame_id() else {
|
||||
return Task::ready(Ok(()));
|
||||
};
|
||||
list.go_to_stack_frame(stack_frame_id, window, cx)
|
||||
})
|
||||
.detach();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1239,7 +1245,7 @@ impl RunningState {
|
|||
}
|
||||
|
||||
pub(crate) fn selected_stack_frame_id(&self, cx: &App) -> Option<dap::StackFrameId> {
|
||||
self.stack_frame_list.read(cx).selected_stack_frame_id()
|
||||
self.stack_frame_list.read(cx).opened_stack_frame_id()
|
||||
}
|
||||
|
||||
pub(crate) fn stack_frame_list(&self) -> &Entity<StackFrameList> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue