[X] I have skimmed other issues to see if this bug has already been reported.
[X] I'm fully certain that this is not a breaking change, see the latest release.
[X] This plugin and its dependencies are up to date with the latest commit.
[X] I'm willing to fix this through a PR.
Expected Behavior
I added a custom leading section that shows the window number. When I open a new file, it should update the window numbers shown for each winbar.
Actual Behavior
But when I open nerd-tree open a file in split window, the window number of the previously opened windows are not updating. This is because in the autocmd.lua it is calling ui.update() without a window number (nil value), thus it will only update the current open window.
Neovim Version
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713773202
Run "nvim -V1 -v" for more info
### Minimal Configuration
```Lua
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
-- do not remove the colorscheme!
"folke/tokyonight.nvim",
{
"utilyre/barbecue.nvim",
dependencies = {
"neovim/nvim-lspconfig",
"SmiteshP/nvim-navic",
"nvim-tree/nvim-web-devicons",
},
config = function()
require("barbecue").setup({
show_dirname = false,
show_basename = true,
show_modified = true,
show_diagnostics = true,
lead_custom_section = function(_, winr)
return " " .. vim.api.nvim_win_get_number(winr) .. " "
end,
})
end,
},
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
-- add anything else here
vim.opt.termguicolors = true
-- do not remove the colorscheme!
vim.cmd([[colorscheme tokyonight]])
Reproduction
Open a file
Open another file in split view
See the window numbers become duplicate because the old one is not updated.
Requirements
Expected Behavior
I added a custom leading section that shows the window number. When I open a new file, it should update the window numbers shown for each winbar.
Actual Behavior
But when I open
nerd-tree
open a file in split window, the window number of the previously opened windows are not updating. This is because in theautocmd.lua
it is callingui.update()
without a window number (nil value), thus it will only update the current open window.Neovim Version
Reproduction