Skip to content

Commit

Permalink
fix: get list of buffers (not files) with breakpoints (#768)
Browse files Browse the repository at this point in the history
Co-authored-by: Samuele Favazza <[email protected]>
  • Loading branch information
sfavazza and sfavazza-duagon authored Apr 3, 2024
1 parent c95537c commit ed360fd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dap-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -861,8 +861,10 @@ will be reversed."

(defun dap--buffers-w-breakpoints ()
"Get only the buffers featuring at least one breakpoint"
;; get the list from the keys of the breakpoint hash-table
(ht-keys (dap--get-breakpoints)))
;; extract the list of buffers featuring a breakpoint from their first breakpoint marker
;; (as stored in the LSP metadata)
(--map (marker-buffer (plist-get (car it) :marker))
(ht-values (dap--get-breakpoints))))

(defun dap--refresh-breakpoints ()
"Refresh breakpoints for DEBUG-SESSION."
Expand Down

0 comments on commit ed360fd

Please sign in to comment.