@@ -1,9 +1,16 @@
1−use helix_core::syntax;
1+use helix_core::{syntax, Selection};
22use helix_dap::Payload;
33use helix_lsp::{lsp, util::lsp_pos_to_pos, LspProgressMap};
44use helix_view::{theme, Editor};
55
6−use crate::{args::Args, compositor::Compositor, config::Config, job::Jobs, ui};
6+use crate::{
7+ args::Args,
8+ commands::{align_view, Align},
9+ compositor::Compositor,
10+ config::Config,
11+ job::Jobs,
12+ ui,
13+};
714
815use log::error;
916
@@ -300,13 +307,22 @@ impl Application {
300307 Some(helix_dap::Source {
301308 path: Some(src), ..
302309 }),
310+ line,
311+ column,
303312 ..
304313 }) = &debugger.stack_pointer
305314 {
306315 let path = src.clone();
316+ let line = *line;
317+ let column = *column;
307318 self.editor
308319 .open(path, helix_view::editor::Action::Replace)
309320 .unwrap();
321+
322+ let (view, doc) = current!(self.editor);
323+ let pos = doc.text().line_to_char(line - 1) + column;
324+ doc.set_selection(view.id, Selection::point(pos));
325+ align_view(doc, view, Align::Center);
310326 }
311327 self.editor.set_status(status);
312328 }