famiu / bufdelete.nvim

Delete Neovim buffers without losing window layout
GNU General Public License v3.0
515 stars 16 forks source link

[Bug] Deleting a buffer that set 'bufhidden=delete' will trigger Vim error E516. #51

Closed gh-liu closed 8 months ago

gh-liu commented 9 months ago

Neovim version NVIM v0.10.0-dev-2175+gc8a27bae3

Describe the bug

E5108: Error executing lua: ...al/share/nvim/lazy/bufdelete.nvim/lua/bufdelete/init.lua:151: Vim:E516: No buffers were deleted stack traceback: [C]: in function 'bdelete' ...al/share/nvim/lazy/bufdelete.nvim/lua/bufdelete/init.lua:151: in function 'buf_kill' ...al/share/nvim/lazy/bufdelete.nvim/lua/bufdelete/init.lua:230: in function 'bufdelete'

To Reproduce Steps to reproduce the behavior:

  1. Open a buffer
  2. Run :set bufhidden=delete
  3. Run :Bdelete
  4. See error

Expected behavior No error is triggered.

Provide a minimal configuration to reproduce the bug

Screenshots

Additional context

famiu commented 8 months ago

Does #53 fix your problem?

vlmonk commented 8 months ago

Based on my tests, #53 fixes this bug.

famiu commented 8 months ago

Closed by #53