rcarriga / vim-ultest

The ultimate testing plugin for (Neo)Vim
MIT License
385 stars 15 forks source link

Debugging recipe in wiki needs minor correction #61

Closed amenonsen closed 3 years ago

amenonsen commented 3 years ago

At https://github.com/rcarriga/vim-ultest/wiki/Debugging-Recipes, the pytest recipe refers to a module_index variable that's not defined. I don't (yet) fully understand what ought to be in cmd, but I used the following code just to follow the intent of the code in the recipe, and I can confirm it works (i.e., :UltestDebug starts up a debugging session).

+                            local module_index = 1
+                            if vim.tbl_contains(non_modules, cmd[1]) then
+                                module_index = 3
+                            end
+                            local module = cmd[module_index]
+                            local args = vim.list_slice(cmd, module_index + 1)

(I didn't see a way to edit the wiki directly, and I'm not sure how to make a PR against it, hence this issue.)

rcarriga commented 3 years ago

Thanks for pointing out! I'll make the edit now