nvim-cokeline icon indicating copy to clipboard operation
nvim-cokeline copied to clipboard

Error `E937` displayed when closing `fugitive-summary` buffer with `focus_on_delete` set to `prev` or `next`

Open EtiamNullam opened this issue 3 years ago • 0 comments

Error E937: Attempt to delete a buffer that is in use is shown when trying to close fugitive-summary with buffers.focus_on_delete set to prev or next:

Error detected while processing BufDelete Autocommands for "*":
E5108: Error executing lua ...sers\user\.vim-plug\cokeline.nvim/lua/cokeline/augroups.lua:15: Vim(buffer):E937: Attempt to delete a buffer that is in use
stack traceback:
	[C]: in function 'cmd'
	...sers\user\.vim-plug\cokeline.nvim/lua/cokeline/augroups.lua:15: in function 'close_bufnr'
	[string ":lua"]:1: in main chunk

Steps to reproduce:

  1. Set buffers.focus_on_delete to prev or next:
require('cokeline').setup {
    buffers = {
        focus_on_delete = 'prev',
    },
}
  1. Run :Git in a git repository to open fugitive-summary
  2. Close buffer with :bdelete
  3. Notice exception is thrown (see above)

EtiamNullam avatar Apr 25 '22 21:04 EtiamNullam