From 91f2c60b3629469d918d368707a64a5c1dda73e1 Mon Sep 17 00:00:00 2001 From: Dmitry Sharshakov Date: Sun, 22 Aug 2021 09:28:50 +0300 Subject: Jump to stack pointer when stopped --- helix-term/src/application.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'helix-term') diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index a9aafad2..c52928c4 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -223,6 +223,16 @@ impl Application { status.push_str(" (all threads stopped)"); } + if let Some(helix_dap::StackFrame { + source: Some(helix_dap::Source { + path: Some(src), + .. + }), + .. + }) = &debugger.stack_pointer { + let path = src.clone().into(); + self.editor.open(path, helix_view::editor::Action::Replace).unwrap(); + } self.editor.set_status(status); self.render(); } -- cgit v1.2.3-70-g09d2