Skip to content

Conversation

@cladera
Copy link
Contributor

@cladera cladera commented Oct 16, 2022

Set terminal dap buffer name with protected call. If setting buffer name fails, use a placeholder.

Fixes #722

@mfussenegger
Copy link
Owner

Can you explain what kind of names lead to the error? The reproduction steps in #722 don't reproduce the issue because it's depending on the class/test name

@cladera
Copy link
Contributor Author

cladera commented Nov 6, 2022

Hi @mfussenegger! Sorry for not responding you back sooner. I could reproduce the error with the following class and method name:

com.cgc.nvimdap.HelloControllerTests#shouldReturnHelloWorld

@mfussenegger
Copy link
Owner

That's odd, calling lua vim.api.nvim_buf_set_name(0, '[dap-terminal] com.cgc.nvimdap.HelloControllerTests#shouldReturnHelloWorld') works fine for me. Could you show the error message you got?

@cladera
Copy link
Contributor Author

cladera commented Nov 18, 2022

Error executing vim.schedule lua callback: ...rvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:266: Vim(append):E5248: Invalid character in group name
stack traceback:
        [C]: in function 'nvim_buf_set_name'
        ...rvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:266: in function 'handler'
        ...rvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:901: in function 'handle_body'
        ...rvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:1077: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

Set terminal dap buffer name with protected call. If setting
buffer name fails, use a placeholder.

Fixes mfussenegger#722
@mfussenegger mfussenegger force-pushed the fix/722-dap-terminal-buf-name branch from 86e2589 to 5e1f86f Compare December 1, 2022 11:13
@mfussenegger mfussenegger merged commit 8f396b7 into mfussenegger:master Dec 1, 2022
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.

debug session fails to start due to invalid buffer name

2 participants