Skip to content

Commit cf94cfb

Browse files
author
ANtlord
authored
Change list breakpoints to create new qf-list if current isn't listing breakpoints
1 parent 2e600ca commit cf94cfb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lua/dap.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,13 @@ end
511511

512512
function M.list_breakpoints(open_quickfix)
513513
local qf_list = lazy.breakpoints.to_qf_list(lazy.breakpoints.get())
514-
vim.fn.setqflist({}, 'r', {
514+
local current_qflist_title = vim.fn.getqflist({ title = 1 }).title
515+
action = ' '
516+
if current_qflist_title == DAP_QUICKFIX_TITLE then
517+
action = 'r'
518+
end
519+
520+
vim.fn.setqflist({}, action, {
515521
items = qf_list,
516522
context = DAP_QUICKFIX_CONTEXT,
517523
title = DAP_QUICKFIX_TITLE

0 commit comments

Comments
 (0)