pull/574/head
Dmitry Sharshakov 3 years ago
parent 2158366b24
commit 34c6094604
No known key found for this signature in database
GPG Key ID: 471FD32E15FD8473

1
Cargo.lock generated

@ -390,7 +390,6 @@ dependencies = [
"serde_json", "serde_json",
"signal-hook", "signal-hook",
"signal-hook-tokio", "signal-hook-tokio",
"smallvec",
"tokio", "tokio",
"tokio-stream", "tokio-stream",
"toml", "toml",

@ -225,9 +225,7 @@ impl Client {
} }
pub fn capabilities(&self) -> &DebuggerCapabilities { pub fn capabilities(&self) -> &DebuggerCapabilities {
self.caps self.caps.as_ref().expect("debugger not yet initialized!")
.as_ref()
.expect("debugger not yet initialized!")
} }
pub async fn initialize(&mut self, adapter_id: String) -> Result<()> { pub async fn initialize(&mut self, adapter_id: String) -> Result<()> {

@ -56,7 +56,5 @@ toml = "0.5"
serde_json = "1.0" serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
smallvec = "1.4"
[target.'cfg(not(windows))'.dependencies] # https://github.com/vorner/signal-hook/issues/100 [target.'cfg(not(windows))'.dependencies] # https://github.com/vorner/signal-hook/issues/100
signal-hook-tokio = { version = "0.3", features = ["futures-v0_3"] } signal-hook-tokio = { version = "0.3", features = ["futures-v0_3"] }

@ -13,7 +13,6 @@ use crate::{
}; };
use log::error; use log::error;
use smallvec::smallvec;
use std::{ use std::{
io::{stdout, Write}, io::{stdout, Write},
sync::Arc, sync::Arc,
@ -305,20 +304,17 @@ impl Application {
if let Some(helix_dap::StackFrame { if let Some(helix_dap::StackFrame {
source: source:
Some(helix_dap::Source { Some(helix_dap::Source {
path: Some(src), .. path: Some(ref src),
..
}), }),
line, line,
column, column,
end_line, end_line,
end_column, end_column,
.. ..
}) = &debugger.stack_pointer }) = debugger.stack_pointer
{ {
let path = src.clone(); let path = src.clone();
let line = *line;
let column = *column;
let end_line = *end_line;
let end_column = *end_column;
self.editor self.editor
.open(path, helix_view::editor::Action::Replace) .open(path, helix_view::editor::Action::Replace)
.unwrap(); .unwrap();
@ -333,7 +329,10 @@ impl Application {
doc.set_selection( doc.set_selection(
view.id, view.id,
Selection::new( Selection::new(
smallvec![Range::new(start.min(text_end), end.min(text_end))], helix_core::SmallVec::from_vec(vec![Range::new(
start.min(text_end),
end.min(text_end),
)]),
0, 0,
), ),
); );

@ -4422,11 +4422,7 @@ fn dap_start(cx: &mut Context) {
let request = debugger.initialize(config.name); let request = debugger.initialize(config.name);
let _ = block_on(request).unwrap(); let _ = block_on(request).unwrap();
let sessions = cx let sessions = doc.language_config().and_then(|x| x.debug_configs.clone());
.editor
.syn_loader
.language_config_for_file_name(&path)
.and_then(|x| x.debug_configs.clone());
let sessions = match sessions { let sessions = match sessions {
Some(c) => c, Some(c) => c,

Loading…
Cancel
Save