bufferline.nvim icon indicating copy to clipboard operation
bufferline.nvim copied to clipboard

[Feature Request]: Commands `BufferlineClose*` close modified buffers

Open Shatur opened this issue 3 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

What happened?

Commands BuferlineCloseLeft, BuferlineCloseRight and BufferlinePickClose close modified buffers.

What did you expect to happen?

I would expect to have an error message like "Unable to close modified buffer, add ! to override". So it would be nice to have the current behavior with bang and the expected behavior without it.

Config

require("bufferline").setup({})

Additional Information

No response

commit

No response

Shatur avatar Jun 02 '22 17:06 Shatur

@Shatur under the hood the API function used is called with force set to true

https://github.com/akinsho/bufferline.nvim/blob/e9697f74612f90cc1fac7b5a973e1aa1323f9aff/lua/bufferline/commands.lua#L58

Which is my personal preference, I don't mind there being a bang as an option to set this value, but I personally like the default behaviour and am not inclined to change it. If you would like to raise a PR to tweak this I'd be happy to review, but I'm definitely not keen on adding this functionality myself since I already personally like the current behaviour

akinsho avatar Jun 02 '22 17:06 akinsho

This is now fixed on dev by #563

akinsho avatar Sep 22 '22 16:09 akinsho