From 72f3cc684bd1e8f19b2d3c56da3f359032b8c5dc Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Oct 2023 10:18:50 +0200 Subject: [PATCH] fix(dap): copy config before overriding args --- lua/lazyvim/plugins/extras/dap/core.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/dap/core.lua b/lua/lazyvim/plugins/extras/dap/core.lua index 72aabded..c9aa291a 100644 --- a/lua/lazyvim/plugins/extras/dap/core.lua +++ b/lua/lazyvim/plugins/extras/dap/core.lua @@ -1,6 +1,7 @@ ---@param config {args?:string[]|fun():string[]?} local function get_args(config) local args = type(config.args) == "function" and (config.args() or {}) or config.args or {} + config = vim.deepcopy(config) ---@cast args string[] config.args = function() local new_args = vim.fn.input("Run with args: ", table.concat(args, " ")) --[[@as string]]