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

Use the version 4.0.0: Invalid buffer id: -1 #371

Open
tttoad opened this issue Jul 2, 2024 · 1 comment
Open

Use the version 4.0.0: Invalid buffer id: -1 #371

tttoad opened this issue Jul 2, 2024 · 1 comment

Comments

@tttoad
Copy link

tttoad commented Jul 2, 2024

nvim

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1703358377

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.9.5/share/nvim"

Run :checkhealth for more info
packer.use({
	"rcarriga/nvim-dap-ui",
	tag = 'v4.0.0',
	requires = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" }
})

I get an error when I use "ctrl+o" to switch focus.

Error executing vim.schedule lua callback: ...ck/packer/start/nvim-dap-ui/lua/dapui/windows/layout.lua:35: Invalid buffer id: -1
stack traceback:
        [C]: in function 'nvim_set_current_buf'
        ...ck/packer/start/nvim-dap-ui/lua/dapui/windows/layout.lua:35: in function 'open'
        ...ck/packer/start/nvim-dap-ui/lua/dapui/windows/layout.lua:169: in function 'toggle'
        ...im/site/pack/packer/start/nvim-dap-ui/lua/dapui/init.lua:348: in function 'cb'
        ...im/site/pack/packer/start/nvim-dap-ui/lua/dapui/init.lua:223: in function 'keep_cmdheight'
        ...im/site/pack/packer/start/nvim-dap-ui/lua/dapui/init.lua:325: in function 'toggle'
        /Users/toad/.config/nvim/lua/lsp/dap.lua:343: in function 'c'
        ...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:980: in function <...nvim/site/pack/packer/start/nvim-dap/lua/dap/session.lua:978>
222.mov

If fallback to v2.6.0, it works.

@vimlucid
Copy link

vimlucid commented Nov 22, 2024

I am encountering the same issue.

Interestingly enough sometimes it works and sometimes not (seemingly in the same situation - e.g. start fresh nvim, navigate to a file and run :lua require('dapui').toggle() - this same set of actions sometimes breaks it and sometimes not).

Also it never broke if I didn't havigate to the file before running toggle() (and stayed on the "greeting page" in nvim)

I am using the "horizontal" layout.

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

No branches or pull requests

2 participants