aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-11-22 07:30:56 +0000
committerBlaž Hrastnik2021-11-22 07:30:56 +0000
commit72576822f31ee2e2f88a1b627b0f5c14dc66ec37 (patch)
tree77a51fb211731e3f2867fb0c9a4a718dd56bd5c7
parent85b4410703fdcf414502daa974061216c64115e8 (diff)
dap: Replace breakpoint when changed event comes through
-rw-r--r--helix-term/src/application.rs27
1 files changed, 14 insertions, 13 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index 242dc837..c76a2e28 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -397,19 +397,20 @@ impl Application {
.position(|b| b.id == breakpoint.id)
{
Some(i) => {
- let item = debugger.breakpoints.get_mut(i).unwrap();
- item.verified = breakpoint.verified;
- // TODO: wasteful clones
- item.message = breakpoint.message.or_else(|| item.message.clone());
- item.source = breakpoint.source.or_else(|| item.source.clone());
- item.line = breakpoint.line.or(item.line);
- item.column = breakpoint.column.or(item.column);
- item.end_line = breakpoint.end_line.or(item.end_line);
- item.end_column = breakpoint.end_column.or(item.end_column);
- item.instruction_reference = breakpoint
- .instruction_reference
- .or_else(|| item.instruction_reference.clone());
- item.offset = breakpoint.offset.or(item.offset);
+ debugger.breakpoints[i] = breakpoint;
+ // let item = debugger.breakpoints.get_mut(i).unwrap();
+ // item.verified = breakpoint.verified;
+ // // TODO: wasteful clones
+ // item.message = breakpoint.message.or_else(|| item.message.clone());
+ // item.source = breakpoint.source.or_else(|| item.source.clone());
+ // item.line = breakpoint.line.or(item.line);
+ // item.column = breakpoint.column.or(item.column);
+ // item.end_line = breakpoint.end_line.or(item.end_line);
+ // item.end_column = breakpoint.end_column.or(item.end_column);
+ // item.instruction_reference = breakpoint
+ // .instruction_reference
+ // .or_else(|| item.instruction_reference.clone());
+ // item.offset = breakpoint.offset.or(item.offset);
}
None => {
warn!("Changed breakpoint with id {:?} not found", breakpoint.id);