This commit is contained in:
orip 2025-07-04 17:51:56 +03:00
parent 992db9c466
commit 222769ba31
1 changed files with 4 additions and 12 deletions

View File

@ -57,21 +57,15 @@ return {
local props = { local props = {
['Condition'] = { ['Condition'] = {
value = bp.condition, value = bp.condition,
setter = function(v) setter = function(v) bp.condition = v end,
bp.condition = v
end,
}, },
['Hit Condition'] = { ['Hit Condition'] = {
value = bp.hitCondition, value = bp.hitCondition,
setter = function(v) setter = function(v) bp.hitCondition = v end,
bp.hitCondition = v
end,
}, },
['Log Message'] = { ['Log Message'] = {
value = bp.logMessage, value = bp.logMessage,
setter = function(v) setter = function(v) bp.logMessage = v end,
bp.logMessage = v
end,
}, },
} }
local menu_options = {} local menu_options = {}
@ -80,9 +74,7 @@ return {
end end
vim.ui.select(menu_options, { vim.ui.select(menu_options, {
prompt = 'Edit Breakpoint', prompt = 'Edit Breakpoint',
format_item = function(item) format_item = function(item) return ('%s: %s'):format(item, props[item].value) end,
return ('%s: %s'):format(item, props[item].value)
end,
}, function(choice) }, function(choice)
if choice == nil then if choice == nil then
-- User cancelled the selection -- User cancelled the selection