Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix restart opts not handling nil value #900

Merged
merged 1 commit into from
Mar 15, 2023

Conversation

ArtAndreev
Copy link
Contributor

I started to make some custom mappings and created the next mapping:

vim.keymap.set('n', '<F4>', function() require('dap').restart() end)

Then I manually tested it and got and error:

E5108: Error executing lua: ...l/share/nvim/site/pack/packer/start/nvim-dap/lua/dap.lua:699: attempt to index local 'opts' (a nil value)
stack traceback:
        ...l/share/nvim/site/pack/packer/start/nvim-dap/lua/dap.lua:699: in function 'restart'
        /Users/artyom/.config/nvim/lua/core/mappings.lua:57: in function </Users/artyom/.config/nvim/lua/core/mappings.lua:57>

All other mappings have optional opts and I don't have problems with them.

This PR enables optional opts like config for restart function.

@mfussenegger mfussenegger merged commit a5b059e into mfussenegger:master Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants