debugger: Add support for setting multiple breakpoints via actions (#28437)
Allow setting multiple breakpoints with multi cursors Release Notes: - N/A --------- Co-authored-by: Anthony Eid <hello@anthonyeid.me> Co-authored-by: Remco Smits <djsmits12@gmail.com> Co-authored-by: Anthony <anthony@zed.dev>
This commit is contained in:
parent
5757e352b0
commit
c35238bd72
2 changed files with 93 additions and 64 deletions
|
@ -17999,7 +17999,15 @@ fn add_log_breakpoint_at_cursor(
|
|||
cx: &mut Context<Editor>,
|
||||
) {
|
||||
let (anchor, bp) = editor
|
||||
.breakpoint_at_cursor_head(window, cx)
|
||||
.breakpoints_at_cursors(window, cx)
|
||||
.first()
|
||||
.and_then(|(anchor, bp)| {
|
||||
if let Some(bp) = bp {
|
||||
Some((*anchor, bp.clone()))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.unwrap_or_else(|| {
|
||||
let cursor_position: Point = editor.selections.newest(cx).head();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue