debugger: Fix bug where deleting a breakpoint could delete multiple breakpoints (#28562)
This PR fixes a bug when deleting a breakpoint with a (log, conditional, hit condition) message by removing the message. All breakpoints that contain that type of message were also deleted. Release Notes: - N/A
This commit is contained in:
parent
353ae2335b
commit
d4736a5427
2 changed files with 41 additions and 13 deletions
|
@ -8960,10 +8960,16 @@ impl Editor {
|
|||
.map(|selection| {
|
||||
let cursor_position: Point = selection.head().to_point(&snapshot.buffer_snapshot);
|
||||
|
||||
let breakpoint_position = snapshot
|
||||
.display_snapshot
|
||||
.buffer_snapshot
|
||||
.anchor_after(Point::new(cursor_position.row, 0));
|
||||
let breakpoint_position = self
|
||||
.breakpoint_at_row(cursor_position.row, window, cx)
|
||||
.map(|bp| bp.0)
|
||||
.unwrap_or_else(|| {
|
||||
snapshot
|
||||
.display_snapshot
|
||||
.buffer_snapshot
|
||||
.anchor_after(Point::new(cursor_position.row, 0))
|
||||
});
|
||||
|
||||
let breakpoint = self
|
||||
.breakpoint_at_anchor(breakpoint_position, &snapshot, cx)
|
||||
.map(|(anchor, breakpoint)| (anchor, Some(breakpoint)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue