Skip to content

Commit 9a9efa0

Browse files
committed
Use dap.utils splitstr if available for file:args config
It treats quoted strings as one argument
1 parent 833b044 commit 9a9efa0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lua/dap-python.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,10 @@ function M.setup(python_path, opts)
265265
program = '${file}';
266266
args = function()
267267
local args_string = vim.fn.input('Arguments: ')
268+
local utils = require("dap.utils")
269+
if utils.splitstr and vim.fn.has("nvim-0.10") == 1 then
270+
return utils.splitstr(args_string)
271+
end
268272
return vim.split(args_string, " +")
269273
end;
270274
console = opts.console;

0 commit comments

Comments
 (0)