Skip to content

Commit ed360fd

Browse files
fix: get list of buffers (not files) with breakpoints (#768)
Co-authored-by: Samuele Favazza <[email protected]>
1 parent c95537c commit ed360fd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dap-mode.el

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -861,8 +861,10 @@ will be reversed."
861861

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

867869
(defun dap--refresh-breakpoints ()
868870
"Refresh breakpoints for DEBUG-SESSION."

0 commit comments

Comments
 (0)