mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-24 17:58:51 +02:00
fix(bufferline): correctly configure bufferline to use the new bufremove util
This commit is contained in:
parent
289c2f81c4
commit
2e1c945f61
2 changed files with 6 additions and 4 deletions
|
@ -71,9 +71,9 @@ return {
|
|||
opts = {
|
||||
options = {
|
||||
-- stylua: ignore
|
||||
close_command = function(n) require("mini.bufremove").delete(n, false) end,
|
||||
close_command = function(n) LazyVim.ui.bufremove(n) end,
|
||||
-- stylua: ignore
|
||||
right_mouse_command = function(n) require("mini.bufremove").delete(n, false) end,
|
||||
right_mouse_command = function(n) LazyVim.ui.bufremove(n) end,
|
||||
diagnostics = "nvim_lsp",
|
||||
always_show_bufferline = false,
|
||||
diagnostics_indicator = function(_, _, diag)
|
||||
|
|
|
@ -208,8 +208,10 @@ function M.foldexpr()
|
|||
return "0"
|
||||
end
|
||||
|
||||
function M.bufremove()
|
||||
local buf = vim.api.nvim_get_current_buf()
|
||||
---@param buf number?
|
||||
function M.bufremove(buf)
|
||||
buf = buf or 0
|
||||
buf = buf == 0 and vim.api.nvim_get_current_buf() or buf
|
||||
|
||||
if vim.bo.modified then
|
||||
local choice = vim.fn.confirm(("Save changes to %q?"):format(vim.fn.bufname()), "&Yes\n&No\n&Cancel")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue