Skip to content

Commit

Permalink
fix(variables): clear prompt_func after editing variable (#330)
Browse files Browse the repository at this point in the history
Closes #325

---

`prompt_func` is not being reset to `nil` when editing a variable. This
causes `canvas:set_prompt()` to get trigger on every other action, like `expand`.
  • Loading branch information
serranomorante authored Mar 18, 2024
1 parent 4575bc3 commit e8506f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/dapui/components/variables.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ return function(client, send_ready)
canvas:add_mapping("edit", function()
prompt_func = function(new_value)
async.run(function()
client.lib.set_variable(parent_ref, variable, new_value)
prompt_func = nil
prompt_fill = nil
client.lib.set_variable(parent_ref, variable, new_value)
send_ready()
end)
end
Expand Down

0 comments on commit e8506f5

Please sign in to comment.