Skip to content

Commit f75db4a

Browse files
committed
fix(dap_breakpoints): update session on bp delete
1 parent 15b9b8d commit f75db4a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lua/fzf-lua/actions.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ M.git_switch = function(selected, opts)
596596
end
597597

598598
M.git_branch_add = function(selected, opts)
599-
-- "reload" actions (fzf version >= 0.36) use field_index = "{q}"
599+
-- "reload" actions (fzf version >= 0.36) use field_index = "{q}"
600600
-- so the prompt input will be found in `selected[1]`
601601
-- previous fzf versions (or skim) restart the process instead
602602
-- so the prompt input will be found in `opts.last_query`
@@ -907,6 +907,13 @@ M.dap_bp_del = function(selected, opts)
907907
dap_bps.remove(entry.bufnr, entry.line)
908908
end
909909
end
910+
-- removing the BP will update the UI, if we're in session
911+
-- we also need to broadcast the BP delete to the DAP server
912+
local session = require("dap").session()
913+
if session then
914+
local bps = dap_bps.get()
915+
session:set_breakpoints(bps)
916+
end
910917
end
911918

912919
return M

0 commit comments

Comments
 (0)