@@ -123,7 +123,8 @@ fn thread_picker(cx: &mut Context, callback_fn: impl Fn(&mut Editor, &dap::Threa
123 thread.name,
123 thread.name,
124 thread_states
124 thread_states
125 .get(&thread.id)
125 .get(&thread.id)
126+ .map(|state| state.as_str())
126− .unwrap_or(&"unknown".to_owned())
127+ .unwrap_or("unknown")
@@ -173,9 +174,7 @@ pub fn dap_start_impl(
174 Some(c) => c,
175 Some(c) => c,
175 None => {
176 None => {
177− "Can't start debug: no debug adapter available for language".to_string(),
177+ editor.set_error("No debug adapter available for language".to_string());
@@ -215,7 +214,7 @@ pub fn dap_start_impl(
215 let start_config = match start_config {
214 let start_config = match start_config {
216 Some(c) => c,
215 Some(c) => c,
217 None => {
216 None => {
218− editor.set_error("Can't start debug: no debug config with given name".to_string());
217+ editor.set_error("No debug config with given name".to_string());
@@ -288,7 +287,7 @@ pub fn dap_start_impl(
288pub fn dap_launch(cx: &mut Context) {
287pub fn dap_launch(cx: &mut Context) {
289 if cx.editor.debugger.is_some() {
288 if cx.editor.debugger.is_some() {
290 cx.editor
289 cx.editor
291− .set_error("Can't start debug: debugger is running".to_string());
290+ .set_error("Debugger is already running".to_string());
@@ -300,9 +299,8 @@ pub fn dap_launch(cx: &mut Context) {
301 Some(c) => c,
300 Some(c) => c,
302 None => {
301 None => {
303− cx.editor.set_error(
302+ cx.editor
304− "Can't start debug: no debug adapter available for language".to_string(),
303+ .set_error("No debug adapter available for language".to_string());
@@ -658,7 +656,7 @@ pub fn dap_edit_condition(cx: &mut Context) {
661− let (_, doc) = current!(cx.editor);
659+ let doc = doc!(cx.editor);
662 let path = match doc.path() {
660 let path = match doc.path() {
663 Some(path) => path,
661 Some(path) => path,
664 None => {
662 None => {
@@ -737,7 +735,7 @@ pub fn dap_edit_log(cx: &mut Context) {
740− let (_, doc) = current!(cx.editor);
738+ let doc = doc!(cx.editor);
741 let path = match doc.path() {
739 let path = match doc.path() {
742 Some(path) => path,
740 Some(path) => path,
743 None => {
741 None => {